From 7f97eac6d26945f97d2a59cbef1834ea2a9a8be2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 1 May 2014 15:44:35 -0700 Subject: 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 --- actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb index cfd33d1f31..dd2cbdcddc 100644 --- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb @@ -136,7 +136,7 @@ module ActionDispatch 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) } -- cgit v1.2.3