Module: Harbor::ViewContext::Helpers::Url
- Included in:
- Harbor::ViewContext
- Defined in:
- lib/harbor/view_context/helpers/url.rb
Overview
Generic URL helpers, such as merging query strings.
Instance Method Summary collapse
-
#merge_query_string(query_string, params = {}) ⇒ Object
Takes a query string and merges the provided params returning a new query string.
Instance Method Details
#merge_query_string(query_string, params = {}) ⇒ Object
Takes a query string and merges the provided params returning a new query string.
8 9 10 |
# File 'lib/harbor/view_context/helpers/url.rb', line 8 def merge_query_string(query_string, params = {}) Rack::Utils::build_query(Rack::Utils::parse_query(query_string).merge(params)) end |