5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 08:31:41 +00:00

garantizar que sea una hash de simbolos

This commit is contained in:
f 2021-10-21 14:25:05 -03:00
parent 883182ffe2
commit 69ef571bdb

View file

@ -154,7 +154,9 @@ class PostsController < ApplicationController
# #
# @return [Hash] # @return [Hash]
def filter_params 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 end
def site def site