summaryrefslogtreecommitdiff
path: root/app/models/gateway_parameter.rb
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-14 00:13:17 +0100
committerspag <spag@golwen.net>2013-01-14 00:13:17 +0100
commitd0d9b60686a3cc044dc53b626403f799b3d4f703 (patch)
tree43f58b313435cb1b7738bcd9efe7cf46103b394b /app/models/gateway_parameter.rb
parent7aac2daa0010293fc27e96f4f767d82ab88abea6 (diff)
gateway_parameter views
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