1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Updated Singular Resource shorthand to mention shorthand without controller name.

This commit is contained in:
Oliver Jakubiec 2013-04-10 17:40:18 -07:00
parent 21b55e4462
commit 1dd7bf4ea3

View file

@ -138,6 +138,12 @@ Sometimes, you have a resource that clients always look up without referencing a
get 'profile', to: 'users#show'
```
Passing a `String` to `match` will expect a `controller#action` format, while passing a `Symbol` will map directly to an action:
```ruby
get 'profile', to: :show
```
This resourceful route:
```ruby