garantizar que sea una hash de simbolos
This commit is contained in:
parent
883182ffe2
commit
69ef571bdb
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue