1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #2503 from arunagw/cant_dup_on_nil

We cannot dup on nil.
This commit is contained in:
Aaron Patterson 2011-08-12 15:54:33 -07:00
commit c420ebf74a

View file

@ -140,7 +140,7 @@ module ActionDispatch
when String
options
when nil, Hash
_routes.url_for((options.dup || {}).reverse_merge!(url_options).symbolize_keys)
_routes.url_for((options || {}).reverse_merge(url_options).symbolize_keys)
else
polymorphic_url(options)
end