diff options
Diffstat (limited to 'app/models/gateway_setting.rb')
-rw-r--r-- | app/models/gateway_setting.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/gateway_setting.rb b/app/models/gateway_setting.rb index bc676a4..078901f 100644 --- a/app/models/gateway_setting.rb +++ b/app/models/gateway_setting.rb @@ -5,9 +5,13 @@ class GatewaySetting < ActiveRecord::Base validates :name, :presence => true, - :uniqueness => true + :uniqueness => {:scope => :gateway_id} validates :class_type, :presence => true, :inclusion => { :in => ['String', 'Integer', 'Boolean'] } + + def to_s + name + end end |