projectblacklight / blacklight_advanced_search

Advanced search plugin for Blacklight
http://projectblacklight.org
Other
24 stars 25 forks source link

fix for deprecation warning from Rails 4.2.x #36

Closed codeforkjeff closed 9 years ago

codeforkjeff commented 9 years ago

This gets rid of the following message: "DEPRECATION WARNING: Calling URL helpers with string keys controller, action is deprecated. Use symbols instead."

awead commented 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.

codeforkjeff commented 9 years ago

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

awead commented 9 years ago

Honestly, I don't know. @cbeer @jkeck @jcoyne any vote on this? Otherwise, I'm :+1:

cbeer commented 9 years ago

I think there's helpers in blacklight that we can use instead:

codeforkjeff commented 9 years ago

Thanks! Changed PR to use search_action_path instead.

awead commented 9 years ago

awesome! thanks @codeforkjeff One last favor to ask... could you squash your commits down to one? After that, I'll merge this for you.

codeforkjeff commented 9 years ago

Squashed. (Hopefully I did it right.) Thanks for all your work on this project!

awead commented 9 years ago

Yep. :+1: