summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-13 22:11:11 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-13 22:11:11 +0100
commitbfacc7b5de2f3a5a9d09a16683a9ba1fcf184d98 (patch)
tree63db7de5cfdb15c42cf5efb4cbdc2ef9f19facf7 /app/models
parent6ae1b0df2648ccc02afa8fe375693e15117736fa (diff)
Fixed some gateway stuff.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/gateway.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/gateway.rb b/app/models/gateway.rb
index 72cf72c..d879fe9 100644
--- a/app/models/gateway.rb
+++ b/app/models/gateway.rb
@@ -14,4 +14,15 @@ class Gateway < ActiveRecord::Base
:presence => true,
:inclusion => { :in => TECHNOLOGIES }
+ before_validation :downcase_technology
+
+ def to_s
+ name
+ end
+
+ private
+ def downcase_technology
+ technology = technology.downcase
+ end
+
end