Permalink
Browse files

never merge url options in to the first data hash

if you want options, don't mix them with the first hash, just pass them
all in with the second hash
  • Loading branch information...
1 parent e99e23d commit 7f97eac6d26945f97d2a59cbef1834ea2a9a8be2 @tenderlove tenderlove committed May 1, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -136,7 +136,7 @@ def polymorphic_url(record_or_hash_or_array, options = {})
url_options = options.except(:action, :routing_type)
unless url_options.empty?
- args.last.kind_of?(Hash) ? args.last.merge!(url_options) : args << url_options
+ args << url_options
end
args.collect! { |a| convert_to_model(a) }

0 comments on commit 7f97eac

Please sign in to comment.