summaryrefslogtreecommitdiff
path: root/app/models/gateway_parameter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/gateway_parameter.rb')
-rw-r--r--app/models/gateway_parameter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/gateway_parameter.rb b/app/models/gateway_parameter.rb
index 3dd2a95..a66af75 100644
--- a/app/models/gateway_parameter.rb
+++ b/app/models/gateway_parameter.rb
@@ -1,4 +1,6 @@
class GatewayParameter < ActiveRecord::Base
+ CLASS_TYPES = ['String', 'Integer', 'Boolean']
+
attr_accessible :gateway_id, :name, :value, :class_type, :description
belongs_to :gateway, :touch => true
@@ -9,7 +11,7 @@ class GatewayParameter < ActiveRecord::Base
validates :class_type,
:presence => true,
- :inclusion => { :in => ['String', 'Integer', 'Boolean'] }
+ :inclusion => { :in => CLASS_TYPES }
def to_s
name