diff options
Diffstat (limited to 'app/models/gateway_setting.rb')
-rw-r--r-- | app/models/gateway_setting.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/gateway_setting.rb b/app/models/gateway_setting.rb index 078901f..cf1292d 100644 --- a/app/models/gateway_setting.rb +++ b/app/models/gateway_setting.rb @@ -1,4 +1,6 @@ class GatewaySetting < ActiveRecord::Base + CLASS_TYPES = ['String', 'Integer', 'Boolean'] + attr_accessible :gateway_id, :name, :value, :class_type, :description belongs_to :gateway @@ -9,7 +11,7 @@ class GatewaySetting < ActiveRecord::Base validates :class_type, :presence => true, - :inclusion => { :in => ['String', 'Integer', 'Boolean'] } + :inclusion => { :in => CLASS_TYPES } def to_s name |