From b1838eeb37f7ab4efc5422290727301b45a7887d Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 7 Sep 2010 14:53:37 +0200 Subject: [PATCH 2/4] Change app to main_app in mounted_helpers --- .../lib/action_dispatch/routing/route_set.rb | 2 +- actionpack/test/dispatch/prefix_generation_test.rb | 6 +++--- .../application/initializers/frameworks_test.rb | 2 +- railties/test/railties/engine_test.rb | 2 +- railties/test/railties/mounted_engine_test.rb | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 19a277a..835ba03 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 1e2df68..26d7655 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 6e9ceb6..da8ae17 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 fabd561..370f934 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 73b7e5b..b52ced9 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 -- 1.7.2