diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-18 08:13:32 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-18 08:13:32 +0100 |
commit | f4abcadbee2dac3f2d8e4dc710af364300aa41bf (patch) | |
tree | f4e4d52c647e21c9f98d617e903d05aa72fdc130 /app/models | |
parent | 17206a20e5bcb44fa4d90f0e176f7aa0fe43bca3 (diff) | |
parent | 73c9984510d572030329d967e44c6adb00d98613 (diff) |
Merge branch 'strong_parameter' into develop
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/call_route.rb | 7 |
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 } |