aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-08-07 01:05:42 +0900
committerGitHub <noreply@github.com>2017-08-07 01:05:42 +0900
commit22928cea1ec34d26fd5e641a40c80435c7b791fe (patch)
treed9acde7637a9a00c49f9f31bb2df5655d80fc826
parent1fe55e94b7a7fbc292b5aec57d4b8d7d46f45ee7 (diff)
parentb1638a8cfa1cddeb9be27b1e34a3cce946204fa4 (diff)
downloadrails-22928cea1ec34d26fd5e641a40c80435c7b791fe.tar.gz
rails-22928cea1ec34d26fd5e641a40c80435c7b791fe.tar.bz2
rails-22928cea1ec34d26fd5e641a40c80435c7b791fe.zip
Merge pull request #30097 from mgiagante/master
Replaces the 17 for the actual call to params[:id] that would make th…
-rw-r--r--guides/source/routing.md2
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: