aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-04-11 12:37:45 -0400
committerGitHub <noreply@github.com>2017-04-11 12:37:45 -0400
commit2fa1d2c12164ebdc9dd410d130dada110608f35f (patch)
treea471d4c706ab06e10945f8e35423df32e971299e
parente426bc22330080965ed6ca28f82deda9e4415feb (diff)
parent04b9d6829723b5c6c7854e9c992f63aada0d72bb (diff)
downloadrails-2fa1d2c12164ebdc9dd410d130dada110608f35f.tar.gz
rails-2fa1d2c12164ebdc9dd410d130dada110608f35f.tar.bz2
rails-2fa1d2c12164ebdc9dd410d130dada110608f35f.zip
Merge pull request #28728 from dskecse/update-documentation-on-routing
Update routing doc on the `get` `to:` option [ci skip]
-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 545f53a8e0..f7dbbc510e 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -142,10 +142,10 @@ Sometimes, you have a resource that clients always look up without referencing a
get 'profile', to: 'users#show'
```
-Passing a `String` to `get` will expect a `controller#action` format, while passing a `Symbol` will map directly to an action but you must also specify the `controller:` to use:
+Passing a `String` to `to:` will expect a `controller#action` format. When using a `Symbol`, the `to:` option should be replaced with `action:`. When using a `String` without a `#`, the `to:` option should be replaced with `controller:`:
```ruby
-get 'profile', to: :show, controller: 'users'
+get 'profile', action: :show, controller: 'users'
```
This resourceful route: