mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Additional explanation to overriding resource routes
This commit is contained in:
parent
5e573579b5
commit
2b8cb84e16
1 changed files with 1 additions and 1 deletions
|
@ -640,7 +640,7 @@ get 'exit', to: 'sessions#destroy', as: :logout
|
|||
|
||||
This will create `logout_path` and `logout_url` as named route helpers in your application. Calling `logout_path` will return `/exit`
|
||||
|
||||
You can also use this to override routing methods defined by resources, like this:
|
||||
You can also use this to override routing methods defined by resources by placing custom routes before the resource is defined, like this:
|
||||
|
||||
```ruby
|
||||
get ':username', to: 'users#show', as: :user
|
||||
|
|
Loading…
Reference in a new issue