summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 08:13:32 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 08:13:32 +0100
commitf4abcadbee2dac3f2d8e4dc710af364300aa41bf (patch)
treef4e4d52c647e21c9f98d617e903d05aa72fdc130 /app/models
parent17206a20e5bcb44fa4d90f0e176f7aa0fe43bca3 (diff)
parent73c9984510d572030329d967e44c6adb00d98613 (diff)
Merge branch 'strong_parameter' into develop
Diffstat (limited to 'app/models')
-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 }