Module: ActionView::Helpers::UrlHelper
- Defined in:
- lib/enhance/urlhelper.rb
Instance Method Summary collapse
- #enhance(url, geometry) ⇒ Object (also: #enhance!)
Instance Method Details
#enhance(url, geometry) ⇒ Object Also known as: enhance!
2 3 4 5 |
# File 'lib/enhance/urlhelper.rb', line 2 def enhance url, geometry matches = url.match /(?<url>[^?]*)\??(?<get>.*)?/ [[matches['url'], geometry].compact.join("/"), matches['get']].compact.reject(&:empty?).join("?") end |