aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/initialization.textile
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-05-29 20:07:47 +0200
committerMikel Lindsaar <raasdnil@gmail.com>2010-06-03 23:32:10 +1000
commited34652d1aca148fea61c5309c1bd5ff3a55abfa (patch)
treeee2fbf07bfca011623c928c0b24a7783925e8f88 /railties/guides/source/initialization.textile
parente6b0ea3f8a252b6795156ad8c0816198f7c18cf9 (diff)
downloadrails-ed34652d1aca148fea61c5309c1bd5ff3a55abfa.tar.gz
rails-ed34652d1aca148fea61c5309c1bd5ff3a55abfa.tar.bz2
rails-ed34652d1aca148fea61c5309c1bd5ff3a55abfa.zip
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.
Diffstat (limited to 'railties/guides/source/initialization.textile')
-rw-r--r--railties/guides/source/initialization.textile6
1 files changed, 1 insertions, 5 deletions
diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile
index cccbb9df06..58ae115ba7 100644
--- a/railties/guides/source/initialization.textile
+++ b/railties/guides/source/initialization.textile
@@ -668,7 +668,6 @@ This file requires _rails/railtie.rb_ which defines +Rails::Railtie+.
* add_routing_namespaces
* add_locales
* add_view_paths
-* add_metals
* add_generator_templates
* load_application_initializers
* load_application_classes
@@ -726,7 +725,6 @@ This file is used to set up the +Rails::Paths+ module which is used to set up he
paths.app.helpers "app/helpers", :eager_load => true
paths.app.models "app/models", :eager_load => true
paths.app.mailers "app/mailers", :eager_load => true
- paths.app.metals "app/metal", :eager_load => true
paths.app.views "app/views", :eager_load => true
paths.lib "lib", :load_path => true
paths.lib.tasks "lib/tasks", :glob => "**/*.rake"
@@ -3154,7 +3152,6 @@ This method is defined like this:
middleware.use('ActionDispatch::Cookies')
middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options })
middleware.use('ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store })
- middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.paths.app.metals.to_a, Rails.application.config.metals) })
middleware.use('ActionDispatch::ParamsParser')
middleware.use('::Rack::MethodOverride')
middleware.use('::ActionDispatch::Head')
@@ -3288,7 +3285,7 @@ Finally, a +Rails::Application::Configuration+ object will be returned. On this
<ruby>
attr_accessor :after_initialize_blocks, :cache_classes, :colorize_logging,
:consider_all_requests_local, :dependency_loading,
- :load_once_paths, :logger, :metals, :plugins,
+ :load_once_paths, :logger, :plugins,
:preload_frameworks, :reload_plugins, :serve_static_assets,
:time_zone, :whiny_nils
@@ -3574,7 +3571,6 @@ The +super+ method it references comes from +Rails::Engine::Configuration+ which
paths.app.controllers "app/controllers", :eager_load => true
paths.app.helpers "app/helpers", :eager_load => true
paths.app.models "app/models", :eager_load => true
- paths.app.metals "app/metal"
paths.app.views "app/views"
paths.lib "lib", :load_path => true
paths.lib.tasks "lib/tasks", :glob => "**/*.rake"