diff options
| author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-21 20:59:05 -0300 | 
|---|---|---|
| committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-07-21 17:34:02 -0700 | 
| commit | a1e795f554e07476f1084a0c76cb8b033d1d0b0c (patch) | |
| tree | c3060a8d0eebb91eb5456b8fd88478b65f9f00d4 /actionpack/lib/action_dispatch | |
| parent | a78547a9c66eeaa3dbf5e2612483ca172fb137e9 (diff) | |
| download | rails-a1e795f554e07476f1084a0c76cb8b033d1d0b0c.tar.gz rails-a1e795f554e07476f1084a0c76cb8b033d1d0b0c.tar.bz2 rails-a1e795f554e07476f1084a0c76cb8b033d1d0b0c.zip | |
options could be of any kind of Hash (Hash, HashWithIndifferentAccess or OrderedHash) this way we keep the properties of the options passed as an argument
Diffstat (limited to 'actionpack/lib/action_dispatch')
| -rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 | ||||
| -rw-r--r-- | actionpack/lib/action_dispatch/routing/url_for.rb | 2 | 
2 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 a9b97a17eb..77688fe397 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -454,7 +454,7 @@ module ActionDispatch        def url_for(options)          finalize! -        options = default_url_options.merge(options || {}) +        options = (options || {}).reverse_merge!(default_url_options)          handle_positional_args(options) diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb index 662eb05c26..9b42f26289 100644 --- a/actionpack/lib/action_dispatch/routing/url_for.rb +++ b/actionpack/lib/action_dispatch/routing/url_for.rb @@ -129,7 +129,7 @@ module ActionDispatch          when String            options          when nil, Hash -          _routes.url_for(url_options.merge((options || {}).symbolize_keys)) +          _routes.url_for((options || {}).reverse_merge!(url_options).symbolize_keys)          else            polymorphic_url(options)          end | 
