diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-17 01:50:49 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-17 01:50:49 +0530 |
commit | 7b70eeed43045dc29e73e23fbfdc323e9d397026 (patch) | |
tree | 8c60cd5893f7e2d231130b7c0abdc0aee8e3bec7 /guides/source/rails_on_rack.md | |
parent | 8eefdb6d7056dc0d4d63a5c34a4b12701ba21c88 (diff) | |
parent | 1fd008cd44cd2eea37db57ee6b3c17d3585d88c1 (diff) | |
download | rails-7b70eeed43045dc29e73e23fbfdc323e9d397026.tar.gz rails-7b70eeed43045dc29e73e23fbfdc323e9d397026.tar.bz2 rails-7b70eeed43045dc29e73e23fbfdc323e9d397026.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
actionpack/lib/action_dispatch/routing/redirection.rb
Diffstat (limited to 'guides/source/rails_on_rack.md')
-rw-r--r-- | guides/source/rails_on_rack.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index ba96c0c0a9..afd1638ed9 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -15,7 +15,7 @@ WARNING: This guide assumes a working knowledge of Rack protocol and Rack concep Introduction to Rack -------------------- -bq. Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. +Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. - [Rack API Documentation](http://rack.rubyforge.org/doc/) @@ -58,7 +58,7 @@ Here's how it loads the middlewares: ```ruby def middleware middlewares = [] - middlewares << [Rails::Rack::Debugger] if options[:debugger] + middlewares << [Rails::Rack::Debugger] if options[:debugger] middlewares << [::Rack::ContentLength] Hash.new(middlewares) end @@ -101,7 +101,7 @@ Action Dispatcher Middleware Stack Many of Action Dispatchers's internal components are implemented as Rack middlewares. `Rails::Application` uses `ActionDispatch::MiddlewareStack` to combine various internal and external middlewares to form a complete Rails Rack application. -NOTE: `ActionDispatch::MiddlewareStack` is Rails' equivalent of `Rack::Builder`, but built for better flexibility and more features to meet Rails' requirements. +NOTE: `ActionDispatch::MiddlewareStack` is Rails equivalent of `Rack::Builder`, but built for better flexibility and more features to meet Rails' requirements. ### Inspecting Middleware Stack @@ -132,11 +132,11 @@ use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use ActionDispatch::ParamsParser -use ActionDispatch::Head +use Rack::Head use Rack::ConditionalGet use Rack::ETag use ActionDispatch::BestStandardsSupport -run ApplicationName::Application.routes +run MyApp::Application.routes ``` Purpose of each of this middlewares is explained in the [Internal Middlewares](#internal-middleware-stack) section. |