Skip to content

Commit

Permalink
partially expand the parameters to match
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 12, 2011
1 parent ad1a891 commit ea7ef95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -1465,9 +1465,9 @@ def name_for_action(as, action) #:nodoc:
end

module Shorthand #:nodoc:
def match(*args)
if args.size == 1 && args.last.is_a?(Hash)
options = args.pop
def match(path, *rest)
if rest.empty? && Hash === path
options = path
path, to = options.find { |name, value| name.is_a?(String) }
options.merge!(:to => to).delete(path)
super(path, options)
Expand Down

0 comments on commit ea7ef95

Please sign in to comment.