Permalink
Browse files

Fix url_for when options is nil

RouteSet#url_for was modifying the options hash that belong to the
caller
  • Loading branch information...
1 parent 163258b commit 8f4cf26d694587ff10ec25e07c3af1382513c47e @rafaelfranca rafaelfranca committed Apr 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -606,7 +606,7 @@ def _generate_prefix(options = {})
end
def url_for(options)
- options = (options || {}).reverse_merge!(default_url_options)
+ options = default_url_options.merge(options || {})
handle_positional_args(options)

0 comments on commit 8f4cf26

Please sign in to comment.