mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Change app to main_app in mounted_helpers
This commit is contained in:
parent
18aee33335
commit
6258f7c972
5 changed files with 8 additions and 8 deletions
|
@ -262,7 +262,7 @@ module ActionDispatch
|
||||||
module MountedHelpers
|
module MountedHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def mounted_helpers(name = :app)
|
def mounted_helpers(name = :main_app)
|
||||||
define_mounted_helper(name) if name
|
define_mounted_helper(name) if name
|
||||||
MountedHelpers
|
MountedHelpers
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,9 +83,9 @@ module TestGenerationPrefix
|
||||||
end
|
end
|
||||||
|
|
||||||
def url_to_application
|
def url_to_application
|
||||||
path = app.url_for( :controller => "outside_engine_generating",
|
path = main_app.url_for(:controller => "outside_engine_generating",
|
||||||
:action => "index",
|
:action => "index",
|
||||||
:only_path => true)
|
:only_path => true)
|
||||||
render :text => path
|
render :text => path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ module ApplicationTests
|
||||||
|
|
||||||
require "#{app_path}/config/environment"
|
require "#{app_path}/config/environment"
|
||||||
assert Foo.method_defined?(:foo_path)
|
assert Foo.method_defined?(:foo_path)
|
||||||
assert Foo.method_defined?(:app)
|
assert Foo.method_defined?(:main_app)
|
||||||
assert_equal ["notify"], Foo.action_methods
|
assert_equal ["notify"], Foo.action_methods
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -437,7 +437,7 @@ module RailtiesTest
|
||||||
end
|
end
|
||||||
|
|
||||||
def routes_helpers_in_view
|
def routes_helpers_in_view
|
||||||
render :inline => "<%= foo_path %>, <%= app.bar_path %>"
|
render :inline => "<%= foo_path %>, <%= main_app.bar_path %>"
|
||||||
end
|
end
|
||||||
|
|
||||||
def polymorphic_path_without_namespace
|
def polymorphic_path_without_namespace
|
||||||
|
|
|
@ -70,14 +70,14 @@ module ApplicationTests
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_application_route
|
def generate_application_route
|
||||||
path = app.url_for(:controller => "/main",
|
path = main_app.url_for(:controller => "/main",
|
||||||
:action => "index",
|
:action => "index",
|
||||||
:only_path => true)
|
:only_path => true)
|
||||||
render :text => path
|
render :text => path
|
||||||
end
|
end
|
||||||
|
|
||||||
def application_route_in_view
|
def application_route_in_view
|
||||||
render :inline => "<%= app.root_path %>"
|
render :inline => "<%= main_app.root_path %>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue