summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 08:11:56 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-18 08:11:56 +0100
commit73c9984510d572030329d967e44c6adb00d98613 (patch)
treef4e4d52c647e21c9f98d617e903d05aa72fdc130 /app/models
parent17206a20e5bcb44fa4d90f0e176f7aa0fe43bca3 (diff)
Clean up mess which was created by renaming :table to :routing_table.
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 }