aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-11-15 04:00:19 -0800
committerAndrew White <andyw@pixeltrix.co.uk>2013-11-15 04:00:19 -0800
commitce06d57e390c03cf5438410efc8345c60d961e05 (patch)
tree9f3ac29a96684d6a9b4eb4002f87e34ee5588c3d /actionpack/lib
parent77ed4d98a7147fcfa1c340385f767a0010abe82a (diff)
parentd04c4fac3bb6f75ba15704dd03faeb5f2d7033f7 (diff)
downloadrails-ce06d57e390c03cf5438410efc8345c60d961e05.tar.gz
rails-ce06d57e390c03cf5438410efc8345c60d961e05.tar.bz2
rails-ce06d57e390c03cf5438410efc8345c60d961e05.zip
Merge pull request #9599 from ognevsky/hash-inside-array-in-url-for
Take Hash with options inside Array in #url_for
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/url_for.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb
index bcebe532bf..4a0ef40873 100644
--- a/actionpack/lib/action_dispatch/routing/url_for.rb
+++ b/actionpack/lib/action_dispatch/routing/url_for.rb
@@ -155,6 +155,8 @@ module ActionDispatch
_routes.url_for(options.symbolize_keys.reverse_merge!(url_options))
when String
options
+ when Array
+ polymorphic_url(options, options.extract_options!)
else
polymorphic_url(options)
end