diff options
Diffstat (limited to 'app/models/call_route.rb')
-rw-r--r-- | app/models/call_route.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/call_route.rb b/app/models/call_route.rb index eba247c..de0f68a 100644 --- a/app/models/call_route.rb +++ b/app/models/call_route.rb @@ -2,4 +2,11 @@ class CallRoute < ActiveRecord::Base attr_accessible :table, :name, :endpoint_type, :endpoint_id, :position has_many :route_elements, :dependent => :destroy + + validates :name, + :presence => true + + def to_s + name.to_s + end end |