From 45e60283e733a535d68d499aa20e095c905f43b0 Mon Sep 17 00:00:00 2001 From: wycats Date: Sat, 29 May 2010 20:07:47 +0200 Subject: Removing Metal from Rails 3. If you have existing Metals, you have a few options: * if your metal behaves like a middleware, add it to the middleware stack via config.middleware.use. You can use methods on the middleware stack to control exactly where it should go * if it behaves like a Rack endpoint, you can link to it in the router. This will result in more optimal routing time, and allows you to remove code in your endpoint that matches specific URLs in favor of the more powerful handling in the router itself. For the future, you can use ActionController::Metal to get a very fast controller with the ability to opt-in to specific controller features without paying the penalty of the full controller stack. Since Rails 3 is closer to Rack, the Metal abstraction is no longer needed. --- railties/test/application/middleware_test.rb | 6 ------ 1 file changed, 6 deletions(-) (limited to 'railties/test/application/middleware_test.rb') diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 617525bf78..78e7c39660 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -82,12 +82,6 @@ module ApplicationTests assert_equal "Rack::Config", middleware.first end - test "shows cascade if any metal exists" do - app_file "app/metal/foo.rb", "class Foo; end" - boot! - assert middleware.include?("ActionDispatch::Cascade") - end - # x_sendfile_header middleware test "config.action_dispatch.x_sendfile_header defaults to ''" do make_basic_app -- cgit v1.2.3