summaryrefslogtreecommitdiff
path: root/app/models/call_route.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/call_route.rb')
-rw-r--r--app/models/call_route.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/call_route.rb b/app/models/call_route.rb
index 0df961d..5d90901 100644
--- a/app/models/call_route.rb
+++ b/app/models/call_route.rb
@@ -1,14 +1,15 @@
class CallRoute < ActiveRecord::Base
- ROUTING_TABLES = ['prerouting', 'outbound', 'inbound']
+ # https://github.com/rails/strong_parameters
+ include ActiveModel::ForbiddenAttributesProtection
- attr_accessible :routing_table, :name, :endpoint_type, :endpoint_id, :position
+ ROUTING_TABLES = ['prerouting', 'outbound', 'inbound']
has_many :route_elements, :dependent => :destroy
validates :name,
:presence => true
- validates :table,
+ validates :routing_table,
:presence => true,
:inclusion => { :in => ROUTING_TABLES }