diff options
author | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-06-30 00:33:12 +0300 |
---|---|---|
committer | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-06-30 00:33:12 +0300 |
commit | 17b01b8057f310c36f0735d5c66bc380f54eb960 (patch) | |
tree | 6a92c2d83761dbbed51bfb5013fbeed4772d5e5c /guides | |
parent | 08f8c8aa52d7cefed7b8fb0ae2cffa3d77d3895f (diff) | |
download | rails-17b01b8057f310c36f0735d5c66bc380f54eb960.tar.gz rails-17b01b8057f310c36f0735d5c66bc380f54eb960.tar.bz2 rails-17b01b8057f310c36f0735d5c66bc380f54eb960.zip |
Added clarification for destroy link_to description in 5.14 [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 2574a2c111..05029b9ebe 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1062,7 +1062,7 @@ You can call `destroy` on Active Record objects when you want to delete them from the database. Note that we don't need to add a view for this action since we're redirecting to the `index` action. -Finally, add a 'destroy' link to your `index` action template +Finally, add a 'Destroy' link to your `index` action template (`app/views/posts/index.html.erb`) to wrap everything together. @@ -1088,8 +1088,8 @@ together. </table> ``` -Here we're using `link_to` in a different way. We pass the named route as the first argument, -and then the final two keys as another argument. The `:method` and `:'data-confirm'` +Here we're using `link_to` in a different way. We pass the named route as the second argument, +and then the options as another argument. The `:method` and `:'data-confirm'` options are used as HTML5 attributes so that when the link is clicked, Rails will first show a confirm dialog to the user, and then submit the link with method `delete`. This is done via the JavaScript file `jquery_ujs` which is automatically included |