diff options
author | Mariano Giagante <mariano.giagante@gmail.com> | 2017-08-06 12:43:57 -0300 |
---|---|---|
committer | Mariano Giagante <mariano.giagante@gmail.com> | 2017-08-06 12:43:57 -0300 |
commit | b1638a8cfa1cddeb9be27b1e34a3cce946204fa4 (patch) | |
tree | d9acde7637a9a00c49f9f31bb2df5655d80fc826 /guides/source | |
parent | 1fe55e94b7a7fbc292b5aec57d4b8d7d46f45ee7 (diff) | |
download | rails-b1638a8cfa1cddeb9be27b1e34a3cce946204fa4.tar.gz rails-b1638a8cfa1cddeb9be27b1e34a3cce946204fa4.tar.bz2 rails-b1638a8cfa1cddeb9be27b1e34a3cce946204fa4.zip |
Replaces the 17 for the actual call to params[:id] that would make the code work as intended. [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/routing.md | 2 |
1 files changed, 1 insertions, 1 deletions
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: |