summaryrefslogtreecommitdiff
path: root/app/controllers/call_routes_controller.rb
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/controllers/call_routes_controller.rb
parent17206a20e5bcb44fa4d90f0e176f7aa0fe43bca3 (diff)
Clean up mess which was created by renaming :table to :routing_table.
Diffstat (limited to 'app/controllers/call_routes_controller.rb')
-rw-r--r--app/controllers/call_routes_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/call_routes_controller.rb b/app/controllers/call_routes_controller.rb
index 130a160..89f66ba 100644
--- a/app/controllers/call_routes_controller.rb
+++ b/app/controllers/call_routes_controller.rb
@@ -15,7 +15,7 @@ class CallRoutesController < ApplicationController
end
def create
- @call_route = CallRoute.new(params[:call_route])
+ @call_route = CallRoute.new(call_route_parameter_params[:call_route])
if @call_route.save
redirect_to @call_route, :notice => t('call_routes.controller.successfuly_created')
else
@@ -27,7 +27,7 @@ class CallRoutesController < ApplicationController
end
def update
- if @call_route.update_attributes(params[:call_route])
+ if @call_route.update_attributes(call_route_parameter_params[:call_route])
redirect_to @call_route, :notice => t('call_routes.controller.successfuly_updated')
else
render :edit
@@ -40,6 +40,10 @@ class CallRoutesController < ApplicationController
end
private
+ def call_route_parameter_params
+ params.require(:call_route).permit(:id, :routing_table, :name, :endpoint_type, :endpoint_id, :position)
+ end
+
def spread_breadcrumbs
add_breadcrumb t("call_routes.index.page_title"), call_routes_path
if @call_route && !@call_route.new_record?
@@ -47,4 +51,5 @@ class CallRoutesController < ApplicationController
end
end
+
end