aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.md
diff options
context:
space:
mode:
authorDzianis Dashkevich <dskecse@gmail.com>2017-04-11 18:50:05 +0300
committerDzianis Dashkevich <dskecse@gmail.com>2017-04-11 18:50:05 +0300
commit04b9d6829723b5c6c7854e9c992f63aada0d72bb (patch)
treecdcf4f4726aa2ac73c61de4c8b2e36aa622147b9 /guides/source/routing.md
parentc134a17b3d740ab1578cdd8da8aba3909910feb2 (diff)
downloadrails-04b9d6829723b5c6c7854e9c992f63aada0d72bb.tar.gz
rails-04b9d6829723b5c6c7854e9c992f63aada0d72bb.tar.bz2
rails-04b9d6829723b5c6c7854e9c992f63aada0d72bb.zip
Update routing doc on the `get` `to:` option [ci skip]
Diffstat (limited to 'guides/source/routing.md')
-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: