From 17b01b8057f310c36f0735d5c66bc380f54eb960 Mon Sep 17 00:00:00 2001 From: Paul Nikitochkin Date: Sun, 30 Jun 2013 00:33:12 +0300 Subject: Added clarification for destroy link_to description in 5.14 [ci skip] --- guides/source/getting_started.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/source/getting_started.md') 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. ``` -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 -- cgit v1.2.3