diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-09-12 16:30:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-09-12 16:50:49 -0700 |
commit | ea7ef9597edf9b0579b6c91290348956a705e6b4 (patch) | |
tree | 63529a37251d6938d8679ca344d181cca5597b03 /actionpack/lib | |
parent | ad1a89164927e1d87062a350ce259b3713c9e898 (diff) | |
download | rails-ea7ef9597edf9b0579b6c91290348956a705e6b4.tar.gz rails-ea7ef9597edf9b0579b6c91290348956a705e6b4.tar.bz2 rails-ea7ef9597edf9b0579b6c91290348956a705e6b4.zip |
partially expand the parameters to `match`
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4d65173f61..c9fa96facf 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1465,9 +1465,9 @@ module ActionDispatch 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) |