From 229a868264a1dd5f4441f4b82ccf2a51cf83511d Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 14 Jul 2010 10:20:30 +0200 Subject: [PATCH] Use new url_for API instead of including routes.url_helpers --- actionpack/test/dispatch/prefix_generation_test.rb | 5 ++--- railties/test/railties/mounted_engine_routes_test.rb | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/actionpack/test/dispatch/prefix_generation_test.rb b/actionpack/test/dispatch/prefix_generation_test.rb index af83ced5e9..c681642eda 100644 --- a/actionpack/test/dispatch/prefix_generation_test.rb +++ b/actionpack/test/dispatch/prefix_generation_test.rb @@ -47,9 +47,8 @@ module TestGenerationPrefix end class ::InsideEngineGeneratingController < ActionController::Base - include BlogEngine.routes.url_helpers def index - render :text => post_path(:id => params[:id]) + render :text => url_for(BlogEngine, :post_path, :id => params[:id]) end def url_to_application @@ -64,7 +63,7 @@ module TestGenerationPrefix class ::OutsideEngineGeneratingController < ActionController::Base include BlogEngine.routes.url_helpers def index - render :text => post_path(:id => 1) + render :text => url_for(BlogEngine, :post_path, :id => 1) end end diff --git a/railties/test/railties/mounted_engine_routes_test.rb b/railties/test/railties/mounted_engine_routes_test.rb index 1a0f5f2c21..319b99383c 100644 --- a/railties/test/railties/mounted_engine_routes_test.rb +++ b/railties/test/railties/mounted_engine_routes_test.rb @@ -45,10 +45,8 @@ module ApplicationTests @plugin.write "app/controllers/posts_controller.rb", <<-RUBY class PostsController < ActionController::Base - include Blog::Engine.routes.url_helpers - def index - render :text => post_path(1) + render :text => url_for(Blog::Engine, :post_path, 1) end def generate_application_route @@ -63,10 +61,8 @@ module ApplicationTests app_file "app/controllers/application_generating_controller.rb", <<-RUBY class ApplicationGeneratingController < ActionController::Base - include Blog::Engine.routes.url_helpers - def engine_route - render :text => posts_path + render :text => url_for(Blog::Engine, :posts_path) end def url_for_engine_route