From b1638a8cfa1cddeb9be27b1e34a3cce946204fa4 Mon Sep 17 00:00:00 2001 From: Mariano Giagante Date: Sun, 6 Aug 2017 12:43:57 -0300 Subject: [PATCH] Replaces the 17 for the actual call to params[:id] that would make the code work as intended. [ci skip] --- guides/source/routing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/routing.md b/guides/source/routing.md index f52b1862a8..638f77be13 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -47,7 +47,7 @@ get '/patients/:id', to: 'patients#show', as: 'patient' and your application contains this code in the controller: ```ruby -@patient = Patient.find(17) +@patient = Patient.find(params[:id]) ``` and this in the corresponding view: