diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-09-30 22:27:02 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-09-30 22:27:02 +0100 |
commit | dd2779e1b83b4d867d47dd286ec0c919f5df12a9 (patch) | |
tree | 6e52ea0a329c24429f4d1d41b065e082f0ed6baa /railties/guides | |
parent | 329b14aa8fdd291a00d17ba12c2e0ab4c3a157cc (diff) | |
parent | 420004e030e96f2ace6e27fd622c90ee9e986677 (diff) | |
download | rails-dd2779e1b83b4d867d47dd286ec0c919f5df12a9.tar.gz rails-dd2779e1b83b4d867d47dd286ec0c919f5df12a9.tar.bz2 rails-dd2779e1b83b4d867d47dd286ec0c919f5df12a9.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/rails_on_rack.textile | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/source/rails_on_rack.textile index 8d9df9e6ef..df93580e89 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> |