From 73c9984510d572030329d967e44c6adb00d98613 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 18 Jan 2013 08:11:56 +0100 Subject: Clean up mess which was created by renaming :table to :routing_table. --- app/models/call_route.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/models') 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 } -- cgit v1.2.3