diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/gateway.rb | 11 |
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 |