From 834be61e61a1ed55f056cdff12ffe4cdcaa7ca65 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Tue, 8 May 2018 07:27:21 +0900 Subject: Fix named route parameter example [ci skip] The prefix of `new` and `edit` generated by `resources` is singular. --- guides/source/routing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'guides') 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 -- cgit v1.2.3