aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2015-11-28 12:47:17 -0500
committerArthur Nogueira Neves <github@arthurnn.com>2015-11-28 12:47:17 -0500
commit312485f3e88af3966b586275ae5097198bfef6a0 (patch)
treedabb970cf00db99c2ed13886667cf21ffae1bc40 /guides
parent3e633c7b3982d971b877d58df80663cdf6a79f83 (diff)
parent3fccecb87b04cd550713ebf5d735c2a6dbccb4a1 (diff)
downloadrails-312485f3e88af3966b586275ae5097198bfef6a0.tar.gz
rails-312485f3e88af3966b586275ae5097198bfef6a0.tar.bz2
rails-312485f3e88af3966b586275ae5097198bfef6a0.zip
Merge pull request #22283 from the-undefined/routes-error-singular-resource
[ci skip] add `controller:` argument to routing.md
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 245689932b..fc756d00b3 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:
+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:
```ruby
-get 'profile', to: :show
+get 'profile', to: :show, controller: 'users'
```
This resourceful route: