From b1b0dcb2dfefca37bb5bc6501e528d7d087d58fd Mon Sep 17 00:00:00 2001 From: Dani Macho Date: Sun, 2 Nov 2014 12:52:29 +0100 Subject: [PATCH] Added permitted params under tags controller --- app/controllers/tags_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 6ed0bcb..eb3d208 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -10,8 +10,8 @@ class TagsController < ApplicationController def alpha_grouped_index - #params = tags_params(params) - post_type = params[:post_type] || "offer" + permitted = tags_params(params) + post_type = permitted[:post_type] || "offer" case post_type when "offer" @@ -36,8 +36,8 @@ class TagsController < ApplicationController end private - def tags_params - params[:tags].permit(*%w"post_type") + def tags_params(params) + params.permit(:post_type) end end