summaryrefslogtreecommitdiff
path: root/app/models/gateway_setting.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-13 22:26:28 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-13 22:26:28 +0100
commit57097d16d2a7e86f9e03625fd2fb6796504c32a2 (patch)
tree2b04ae7c415660c49525f785a9449579a34a4a13 /app/models/gateway_setting.rb
parentbfacc7b5de2f3a5a9d09a16683a9ba1fcf184d98 (diff)
Bugfixes for gateway stuff.
Diffstat (limited to 'app/models/gateway_setting.rb')
-rw-r--r--app/models/gateway_setting.rb6
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