mirror of https://github.com/rails/rails
remove the mounted? method
we know the routes should not be "optimized" when mounting an application
This commit is contained in:
parent
099fd0efc4
commit
9f63a78d55
|
@ -621,7 +621,7 @@ module ActionDispatch
|
|||
_routes = @set
|
||||
app.routes.define_mounted_helper(name)
|
||||
app.routes.extend Module.new {
|
||||
def mounted?; true; end
|
||||
def optimize_routes_generation?; false; end
|
||||
define_method :find_script_name do |options|
|
||||
super(options) || begin
|
||||
prefix_options = options.slice(*_route.segment_keys)
|
||||
|
|
|
@ -641,12 +641,8 @@ module ActionDispatch
|
|||
:trailing_slash, :anchor, :params, :only_path, :script_name,
|
||||
:original_script_name]
|
||||
|
||||
def mounted?
|
||||
false
|
||||
end
|
||||
|
||||
def optimize_routes_generation?
|
||||
!mounted? && default_url_options.empty?
|
||||
default_url_options.empty?
|
||||
end
|
||||
|
||||
def find_script_name(options)
|
||||
|
|
Loading…
Reference in New Issue