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

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