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

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

Instance Method Summary collapse

Instance Method Details

#match(*args) ⇒ Object



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
# File 'lib/action_dispatch/routing/mapper.rb', line 1290

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