From ef58194129a1dc0a96286c271b71455d37712b42 Mon Sep 17 00:00:00 2001
From: Joshua Peek <josh@joshpeek.com>
Date: Sat, 26 Sep 2009 11:37:42 -0500
Subject: Move Rails::Static into ActionDispatch

---
 railties/guides/source/rails_on_rack.textile | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

(limited to 'railties/guides/source/rails_on_rack.textile')

diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/source/rails_on_rack.textile
index 545aaa18e0..1ad45f1cca 100644
--- a/railties/guides/source/rails_on_rack.textile
+++ b/railties/guides/source/rails_on_rack.textile
@@ -40,11 +40,8 @@ Here's how +script/server+ creates an instance of +Rack::Builder+
 app = Rack::Builder.new {
   use Rails::Rack::LogTailer unless options[:detach]
   use Rails::Rack::Debugger if options[:debugger]
-
-  map "/" do
-    use Rails::Rack::Static
-    run ActionController::Dispatcher.new
-  end
+  use ActionDispatch::Static
+  run ActionController::Dispatcher.new
 }.to_app
 </ruby>
 
@@ -52,7 +49,7 @@ Middlewares used in the code above are primarily useful only in the development
 
 |_.Middleware|_.Purpose|
 |+Rails::Rack::LogTailer+|Appends log file output to console|
-|+Rails::Rack::Static+|Serves static files inside +RAILS_ROOT/public+ directory|
+|+ActionDispatch::Static+|Serves static files inside +RAILS_ROOT/public+ directory|
 |+Rails::Rack::Debugger+|Starts Debugger|
 
 h4. +rackup+
@@ -64,7 +61,7 @@ To use +rackup+ instead of Rails' +script/server+, you can put the following ins
 require "config/environment"
 
 use Rails::Rack::LogTailer
-use Rails::Rack::Static
+use ActionDispatch::Static
 run ActionController::Dispatcher.new
 </ruby>
 
-- 
cgit v1.2.3

