aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-03-09 20:57:43 -0600
committerJoshua Peek <josh@joshpeek.com>2010-03-09 20:57:43 -0600
commite38ea982ff8fea5b616297b458ca2c669de0d659 (patch)
tree9924fa76d282d46bd9e907df5148753c5fd10e9c
parent7db80f87e9c194713c2016820e39af6043ddf8d0 (diff)
downloadrails-e38ea982ff8fea5b616297b458ca2c669de0d659.tar.gz
rails-e38ea982ff8fea5b616297b458ca2c669de0d659.tar.bz2
rails-e38ea982ff8fea5b616297b458ca2c669de0d659.zip
Unused RouteSet#url_for is hogging a good method name
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb17
1 files changed, 4 insertions, 13 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 15c7cd00ba..aa1e25aa8b 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -235,31 +235,22 @@ module ActionDispatch
named_routes.install(destinations, regenerate_code)
end
- def url_for
- @url_for ||= begin
- router = self
- Module.new do
- extend ActiveSupport::Concern
- include UrlFor
-
- define_method(:_router) { router }
- end
- end
- end
-
def url_helpers
@url_helpers ||= begin
router = self
Module.new do
extend ActiveSupport::Concern
- include router.url_for
+ include UrlFor
# ROUTES TODO: install_helpers isn't great... can we make a module with the stuff that
# we can include?
+ # Yes plz - JP
included do
router.install_helpers(self)
end
+
+ define_method(:_router) { router }
end
end
end