aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorMike Gunderloy <MikeG1@larkfarm.com>2017-05-20 09:30:51 -0500
committerMike Gunderloy <MikeG1@larkfarm.com>2017-05-20 09:51:43 -0500
commit99209b4ec06b2f87b28de5bd7d02b6ed815994e6 (patch)
treef14278916799f9cd6c0b7ba4bbdbab863fed62be /guides
parentdccfcbfdafb2bd77a7d130cb69e0c3725d7f7c6d (diff)
downloadrails-99209b4ec06b2f87b28de5bd7d02b6ed815994e6.tar.gz
rails-99209b4ec06b2f87b28de5bd7d02b6ed815994e6.tar.bz2
rails-99209b4ec06b2f87b28de5bd7d02b6ed815994e6.zip
Update 'Rails on Rack' guide [ci skip]
* Adjust middlewares list to match current defaults * application.routes runs on application object, not Rails * Add explanation of Sprockets::Rails::QuietAssets
Diffstat (limited to 'guides')
-rw-r--r--guides/source/rails_on_rack.md17
1 files changed, 11 insertions, 6 deletions
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md
index f25b185fb5..cef8450ee4 100644
--- a/guides/source/rails_on_rack.md
+++ b/guides/source/rails_on_rack.md
@@ -110,11 +110,12 @@ use ActiveSupport::Cache::Strategy::LocalCache::Middleware
use Rack::Runtime
use Rack::MethodOverride
use ActionDispatch::RequestId
+use ActionDispatch::RemoteIp
+use Sprockets::Rails::QuietAssets
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use WebConsole::Middleware
use ActionDispatch::DebugExceptions
-use ActionDispatch::RemoteIp
use ActionDispatch::Reloader
use ActionDispatch::Callbacks
use ActiveRecord::Migration::CheckPending
@@ -124,7 +125,7 @@ use ActionDispatch::Flash
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
-run Rails.application.routes
+run MyApp.application.routes
```
The default middlewares shown here (and some others) are each summarized in the [Internal Middlewares](#internal-middleware-stack) section, below.
@@ -238,6 +239,14 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol
* Makes a unique `X-Request-Id` header available to the response and enables the `ActionDispatch::Request#request_id` method.
+**`ActionDispatch::RemoteIp`**
+
+* Checks for IP spoofing attacks.
+
+**`Sprockets::Rails::QuietAssets`**
+
+* Suppresses logger output for asset requests.
+
**`Rails::Rack::Logger`**
* Notifies the logs that the request has began. After request is complete, flushes all the logs.
@@ -250,10 +259,6 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol
* Responsible for logging exceptions and showing a debugging page in case the request is local.
-**`ActionDispatch::RemoteIp`**
-
-* Checks for IP spoofing attacks.
-
**`ActionDispatch::Reloader`**
* Provides prepare and cleanup callbacks, intended to assist with code reloading during development.