Articles
Working With URLs
A common requirement with an html first app is to retain the url state as a user clicks around. For example, if a page has a set of scopes and a set of filters, when you’re building the link to a scope, you’ll want to make sure it also includes the currently active filter.
Generate a link with the current URL parameters
Merge the current url params with a named path
Likn to a named path with the current url parameters
Source
These methods are a thin layer on top of Rails’ own methods - url_for
and request.query_parameters
.