aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-03-07 12:47:08 -0500
committerJon Moss <me@jonathanmoss.me>2016-03-07 12:47:08 -0500
commit7c94db137065e8dbb91c39b55120ca3e497db549 (patch)
treed3b061aaf9d3ebc49e18baf8d963ef22f4f484d1 /guides
parentb4202fec9f3127bf89ded37c91cab879b452536e (diff)
downloadrails-7c94db137065e8dbb91c39b55120ca3e497db549.tar.gz
rails-7c94db137065e8dbb91c39b55120ca3e497db549.tar.bz2
rails-7c94db137065e8dbb91c39b55120ca3e497db549.zip
Remove incorrect Rack documentation example
`Sprockets` does not respond to the call method, so I changed the example to use a fake `MyRackApp`. Closes #22579. [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/routing.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md
index bd3e236a2b..81321c7405 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -812,10 +812,10 @@ In all of these cases, if you don't provide the leading host (`http://www.exampl
Instead of a String like `'articles#index'`, which corresponds to the `index` action in the `ArticlesController`, you can specify any [Rack application](rails_on_rack.html) as the endpoint for a matcher:
```ruby
-match '/application.js', to: Sprockets, via: :all
+match '/application.js', to: MyRackApp, via: :all
```
-As long as `Sprockets` responds to `call` and returns a `[status, headers, body]`, the router won't know the difference between the Rack application and an action. This is an appropriate use of `via: :all`, as you will want to allow your Rack application to handle all verbs as it considers appropriate.
+As long as `MyRackApp` responds to `call` and returns a `[status, headers, body]`, the router won't know the difference between the Rack application and an action. This is an appropriate use of `via: :all`, as you will want to allow your Rack application to handle all verbs as it considers appropriate.
NOTE: For the curious, `'articles#index'` actually expands out to `ArticlesController.action(:index)`, which returns a valid Rack application.