diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-07 17:17:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-07 17:17:06 +0100 |
commit | 3b631df101d911d57ac3fe97514c60ae412e3812 (patch) | |
tree | f7ed5301d70e3113422374f1d0237584a6b6f30b /actionpack/lib | |
parent | f149eb19d4675becee164fee2881a562cdaa0551 (diff) | |
download | rails-3b631df101d911d57ac3fe97514c60ae412e3812.tar.gz rails-3b631df101d911d57ac3fe97514c60ae412e3812.tar.bz2 rails-3b631df101d911d57ac3fe97514c60ae412e3812.zip |
Ensure that segments in default_url_options also work with format specified.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 7752642a7b..90893aa0e6 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -178,7 +178,7 @@ module ActionDispatch # options = (default ||= {}).merge(options) # # keys = [] - # keys -= options.keys unless keys.size == args.size + # keys -= options.keys if args.size < keys.size - 1 # # args = args.zip(keys).inject({}) do |h, (v, k)| # h[k] = v @@ -202,7 +202,7 @@ module ActionDispatch options = (default ||= {}).merge(options) keys = #{route.segment_keys.inspect} - keys -= options.keys unless keys.size == args.size + keys -= options.keys if args.size < keys.size - 1 # take format into account args = args.zip(keys).inject({}) do |h, (v, k)| h[k] = v |