Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Unused RouteSet#url_for is hogging a good method name

  • Loading branch information...
commit e38ea982ff8fea5b616297b458ca2c669de0d659 1 parent 7db80f8
@josh josh authored
Showing with 4 additions and 13 deletions.
  1. +4 −13 actionpack/lib/action_dispatch/routing/route_set.rb
View
17 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -235,31 +235,22 @@ def install_helpers(destinations = [ActionController::Base, ActionView::Base], r
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
Please sign in to comment.
Something went wrong with that request. Please try again.