Skip to content

Commit

Permalink
Symbolize the route argument to fix 'Please use symbols for polymorph…
Browse files Browse the repository at this point in the history
…ic route arguments.' error introduced in Rails 6.1.3.2 security patch
  • Loading branch information
cbeer committed May 10, 2021
1 parent fac4225 commit 37df803
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/blacklight/component_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def document_action_path action_opts, url_opts = {}
if action_opts.path
send(action_opts.path, url_opts)
elsif url_opts[:id].class.respond_to?(:model_name)
url_for([action_opts.key, url_opts[:id]])
url_for([action_opts.key.to_sym, url_opts[:id]])
else
send("#{action_opts.key}_#{controller_name}_path", url_opts)
end
Expand Down

0 comments on commit 37df803

Please sign in to comment.