From 69ef571bdb4a4768c37865907fb07629fc017487 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 21 Oct 2021 14:25:05 -0300 Subject: [PATCH] garantizar que sea una hash de simbolos --- app/controllers/posts_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 9820d71d..f3bc8aac 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -154,7 +154,9 @@ class PostsController < ApplicationController # # @return [Hash] def filter_params - @filter_params ||= params.permit(:q, :category, :layout, :page).to_hash.select { |_, v| v.present? } + @filter_params ||= params.permit(:q, :category, :layout, :page).to_hash.select do |_, v| + v.present? + end.transform_keys(&:to_sym) end def site