aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-07-14 00:46:42 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:06 +0200
commitb53efd21059b9d829a6617fb5b2dd86754684c60 (patch)
tree37557320c2de88ac084dc45747cdc243c0385ad2 /actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
parentb697ba9fd72ac8701747863b42082e59f13ba678 (diff)
downloadrails-b53efd21059b9d829a6617fb5b2dd86754684c60.tar.gz
rails-b53efd21059b9d829a6617fb5b2dd86754684c60.tar.bz2
rails-b53efd21059b9d829a6617fb5b2dd86754684c60.zip
Extended url_for to handle specifying which router should be used.
A few examples: url_for Blog::Engine, :posts_path url_for Blog::Engine, @post url_for Blog::Engine, :action => "main", :controller => "index"
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/polymorphic_routes.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
index fb2118a8d7..15ee7c8051 100644
--- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
+++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -111,7 +111,7 @@ module ActionDispatch
args.last.kind_of?(Hash) ? args.last.merge!(url_options) : args << url_options
end
- send(named_route, *args)
+ url_for _routes.url_helpers.__send__("hash_for_#{named_route}", *args)
end
# Returns the path component of a URL for the given record. It uses