diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-06-30 03:09:31 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-06-30 03:09:31 -0700 |
commit | e9ba6eca657d44e7ba47410253daff3830e414fc (patch) | |
tree | 0e20a07c35587e2db05386f92442a84338d4d81a /guides/source | |
parent | bb1feb02e14064889572f5ab4e47c3a53752c908 (diff) | |
parent | 17b01b8057f310c36f0735d5c66bc380f54eb960 (diff) | |
download | rails-e9ba6eca657d44e7ba47410253daff3830e414fc.tar.gz rails-e9ba6eca657d44e7ba47410253daff3830e414fc.tar.bz2 rails-e9ba6eca657d44e7ba47410253daff3830e414fc.zip |
Merge pull request #11189 from jetthoughts/destroy_link_description_for_getting_started
Added clarification for destroy link_to description in 5.14
Diffstat (limited to 'guides/source')
-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 |