aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-08-04 16:20:56 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:12 +0200
commitf3c703a32f6c7833705e46b8e14f172330a1c916 (patch)
tree6f32bb77743e3d5de9205fe7190cc2fe1448c8a4 /actionpack/lib/action_view/helpers
parent434139f89fd2ec550b8c5ab1309e5a8af06142d7 (diff)
downloadrails-f3c703a32f6c7833705e46b8e14f172330a1c916.tar.gz
rails-f3c703a32f6c7833705e46b8e14f172330a1c916.tar.bz2
rails-f3c703a32f6c7833705e46b8e14f172330a1c916.zip
Refactor RoutesProxy to avoid using _with_routes in helpers
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index f21cffea26..555be6ed2b 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -22,6 +22,10 @@ module ActionView
include ActionDispatch::Routing::UrlFor
include TagHelper
+ def _routes_context
+ controller
+ end
+
# Need to map default url options to controller one.
# def default_url_options(*args) #:nodoc:
# controller.send(:default_url_options, *args)
@@ -29,9 +33,7 @@ module ActionView
#
def url_options
return super unless controller.respond_to?(:url_options)
- controller.send(:_with_routes, _routes) do
- controller.url_options
- end
+ controller.url_options
end
# Returns the URL for the set of +options+ provided. This takes the