Module: ActionDispatch::Routing::Mapper::Shorthand

Included in:
ActionDispatch::Routing::Mapper
Defined in:
actionpack/lib/action_dispatch/routing/mapper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#match(*args) ⇒ Object



1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1472

def match(*args)
  if args.size == 1 && args.last.is_a?(Hash)
    options  = args.pop
    path, to = options.find { |name, value| name.is_a?(String) }
    options.merge!(:to => to).delete(path)
    super(path, options)
  else
    super
  end
end