diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-05-08 07:27:21 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-05-08 07:27:21 +0900 |
commit | 834be61e61a1ed55f056cdff12ffe4cdcaa7ca65 (patch) | |
tree | c691ab37188ee0a327099eef5a8c264a1cfd8f58 | |
parent | 28a4a2fbf4292646bacc1bd82f1777ba2db8e560 (diff) | |
download | rails-834be61e61a1ed55f056cdff12ffe4cdcaa7ca65.tar.gz rails-834be61e61a1ed55f056cdff12ffe4cdcaa7ca65.tar.bz2 rails-834be61e61a1ed55f056cdff12ffe4cdcaa7ca65.zip |
Fix named route parameter example [ci skip]
The prefix of `new` and `edit` generated by `resources` is singular.
-rw-r--r-- | guides/source/routing.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index c309704176..9fd8f6e963 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -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 |