As far as I can tell there’s no ‘preferred’ way to do this instead of
using overwrite_params and this is extrememly usefuly in situations
where it’s hard to know exactly which parameters will be set in a view
(for instance filtering a few of multiple options using query string
params).
Ditto. I’ve returns to a small rails app after a while to discover
overwite_params is deprecated, and I havn’t found out why yet.
Presumably the workaround is to DIY and take everything from
request.params replacing the bits you want to.
(for instance filtering a few of multiple options using query string
params).
Yes exactly what I use it for.
Will this work ok?
instead of:
this:
<%= link_to ‘All’, url_for( request.params.merge({ :listing_type =>
nil}) ) %>