mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove traces of SharedTestRoutes from user code; leave it as a standin for Rails.application.routes in Rails internal tests
This commit is contained in:
parent
5797575bac
commit
3bad24c85d
3 changed files with 0 additions and 14 deletions
|
@ -33,7 +33,6 @@ module ActionController
|
||||||
initializer "action_controller.url_helpers" do |app|
|
initializer "action_controller.url_helpers" do |app|
|
||||||
ActionController::Base.extend ::ActionController::Railtie::UrlHelpers.with(app.routes)
|
ActionController::Base.extend ::ActionController::Railtie::UrlHelpers.with(app.routes)
|
||||||
ActionController::Routing::Routes = app.routes
|
ActionController::Routing::Routes = app.routes
|
||||||
::SharedTestRoutes = app.routes
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -219,18 +219,6 @@ module ActionDispatch
|
||||||
@host = name
|
@host = name
|
||||||
end
|
end
|
||||||
|
|
||||||
# # Returns the URL for the given options, according to the rules specified
|
|
||||||
# # in the application's routes.
|
|
||||||
# def url_for(options)
|
|
||||||
# # ROUTES TODO: @app.router is not guaranteed to exist, so a generic Rack
|
|
||||||
# # application will not work here. This means that a generic Rack application
|
|
||||||
# # integration test cannot call url_for, since the application will not have
|
|
||||||
# # #router on it.
|
|
||||||
# controller ?
|
|
||||||
# controller.url_for(options) :
|
|
||||||
# generic_url_rewriter.rewrite(SharedTestRoutes, options)
|
|
||||||
# end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Performs the actual request.
|
# Performs the actual request.
|
||||||
|
|
|
@ -257,7 +257,6 @@ end
|
||||||
# This stub emulates the Railtie including the URL helpers from a Rails application
|
# This stub emulates the Railtie including the URL helpers from a Rails application
|
||||||
module ActionController
|
module ActionController
|
||||||
class Base
|
class Base
|
||||||
# ROUTES TODO: Rename SharedTestRoutes to something that reflects it's a standin for Rails.application
|
|
||||||
include SharedTestRoutes.url_helpers
|
include SharedTestRoutes.url_helpers
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue