Closed codeforkjeff closed 9 years ago
The action and controller keys might be significant. Should you replace them with keys instead of removing them? Also, if they're coming from Blacklight, they probably just need to be changed to keys there.
Don't URL helpers such as #catalog_index_path ignore the "action" and "controller" keys, since it is generating a new URL? If I've misunderstood something about how those helpers work, I can see calling #symbolize_keys on my_params instead.
I don't think they're coming from blacklight. ActionController::Parameters instances generated by Rails contain string keys. Here is an issue that says converting string keys to symbols is an "application level concern" (not sure I agree, but that seems like the policy): https://github.com/rails/rails/issues/18609
Honestly, I don't know. @cbeer @jkeck @jcoyne any vote on this? Otherwise, I'm :+1:
I think there's helpers in blacklight that we can use instead:
search_action_path
(instead of cataog_index_path)params_for_search
https://github.com/projectblacklight/blacklight/blob/master/app/helpers/blacklight/url_helper_behavior.rb#L166sanitize_search_params
https://github.com/projectblacklight/blacklight/blob/master/app/helpers/blacklight/url_helper_behavior.rb#L197Thanks! Changed PR to use search_action_path instead.
awesome! thanks @codeforkjeff One last favor to ask... could you squash your commits down to one? After that, I'll merge this for you.
Squashed. (Hopefully I did it right.) Thanks for all your work on this project!
Yep. :+1:
This gets rid of the following message: "DEPRECATION WARNING: Calling URL helpers with string keys controller, action is deprecated. Use symbols instead."