diff options
author | spag <spag@golwen.net> | 2013-01-14 00:13:45 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-14 00:13:45 +0100 |
commit | 4670a33c504f36ddb93cf8ed846c65ceb6810c82 (patch) | |
tree | ff7ff25b04259e49aed15d2f6b75d95447946a73 /app/models/gateway_setting.rb | |
parent | d0d9b60686a3cc044dc53b626403f799b3d4f703 (diff) |
gateway_setting views
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 |