Skip to content

Commit

Permalink
update searches_controller to use permitted params and then call to_h…
Browse files Browse the repository at this point in the history
… because params no longer inherit from HashWithIndifferentAccess (#356)
  • Loading branch information
yuenmichelle1 authored Aug 9, 2024
1 parent 9db089a commit da07d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/searches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def previous_href
end

def search_href(opts = { })
permitted = params.slice :page, :page_size, :section, :query, :types
permitted = permit_params.to_h.slice :page, :page_size, :section, :query, :types
query_opts = permitted.merge(opts).collect{ |k, v| "#{ k }=#{ v }" }.join '&'
"/searches?#{ query_opts }"
end
Expand Down

0 comments on commit da07d7d

Please sign in to comment.