diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 19a277a18c..835ba03784 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -262,7 +262,7 @@ module ActionDispatch module MountedHelpers end - def mounted_helpers(name = :app) + def mounted_helpers(name = :main_app) define_mounted_helper(name) if name MountedHelpers end diff --git a/actionpack/test/dispatch/prefix_generation_test.rb b/actionpack/test/dispatch/prefix_generation_test.rb index 1e2df682b3..26d76557dd 100644 --- a/actionpack/test/dispatch/prefix_generation_test.rb +++ b/actionpack/test/dispatch/prefix_generation_test.rb @@ -83,9 +83,9 @@ module TestGenerationPrefix end def url_to_application - path = app.url_for( :controller => "outside_engine_generating", - :action => "index", - :only_path => true) + path = main_app.url_for(:controller => "outside_engine_generating", + :action => "index", + :only_path => true) render :text => path end diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 6e9ceb6ef7..da8ae17518 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -61,7 +61,7 @@ module ApplicationTests require "#{app_path}/config/environment" assert Foo.method_defined?(:foo_path) - assert Foo.method_defined?(:app) + assert Foo.method_defined?(:main_app) assert_equal ["notify"], Foo.action_methods end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index fabd561bd2..370f9342e3 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -437,7 +437,7 @@ module RailtiesTest end def routes_helpers_in_view - render :inline => "<%= foo_path %>, <%= app.bar_path %>" + render :inline => "<%= foo_path %>, <%= main_app.bar_path %>" end def polymorphic_path_without_namespace diff --git a/railties/test/railties/mounted_engine_test.rb b/railties/test/railties/mounted_engine_test.rb index 73b7e5b2e0..b52ced92ec 100644 --- a/railties/test/railties/mounted_engine_test.rb +++ b/railties/test/railties/mounted_engine_test.rb @@ -70,14 +70,14 @@ module ApplicationTests end def generate_application_route - path = app.url_for(:controller => "/main", + path = main_app.url_for(:controller => "/main", :action => "index", :only_path => true) render :text => path end def application_route_in_view - render :inline => "<%= app.root_path %>" + render :inline => "<%= main_app.root_path %>" end end end