Fix named route parameter example [ci skip]

The prefix of `new` and `edit` generated by `resources` is singular.
This commit is contained in:
yuuji.yaginuma 2018-05-08 07:27:21 +09:00
parent 28a4a2fbf4
commit 834be61e61
1 changed files with 5 additions and 5 deletions

View File

@ -1139,10 +1139,10 @@ resources :videos, param: :identifier
```
```
videos GET /videos(.:format) videos#index
POST /videos(.:format) videos#create
new_videos GET /videos/new(.:format) videos#new
edit_videos GET /videos/:identifier/edit(.:format) videos#edit
videos GET /videos(.:format) videos#index
POST /videos(.:format) videos#create
new_video GET /videos/new(.:format) videos#new
edit_video GET /videos/:identifier/edit(.:format) videos#edit
```
```ruby
@ -1160,7 +1160,7 @@ class Video < ApplicationRecord
end
video = Video.find_by(identifier: "Roman-Holiday")
edit_videos_path(video) # => "/videos/Roman-Holiday/edit"
edit_video_path(video) # => "/videos/Roman-Holiday/edit"
```
Inspecting and Testing Routes