mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Unused RouteSet#url_for is hogging a good method name
This commit is contained in:
parent
7db80f87e9
commit
e38ea982ff
1 changed files with 4 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue