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:
parent
21b55e4462
commit
1dd7bf4ea3
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue