Module: Rage::Router::DSLPlugins::LegacyHashNotation
- Included in:
- Rage::Router::DSL::Handler
- Defined in:
- lib/rage/router/dsl_plugins/legacy_hash_notation.rb
Overview
Support legacy URL helpers that use hashes instead of the :to
keyword argument.
Instance Method Summary collapse
Instance Method Details
#mount(*args, **kwargs) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/rage/router/dsl_plugins/legacy_hash_notation.rb', line 37 def mount(*args, **kwargs) if args.empty? && !kwargs.empty? app, at = kwargs.first = kwargs.except(app).merge(at: at) super(app, **) else super end end |