aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@gmail.com>2015-03-02 09:50:55 -0500
committerEileen M. Uchitelle <eileencodes@gmail.com>2015-03-02 09:50:55 -0500
commitf08c3f737b7e77a5069dbef9c591c89d163b75d2 (patch)
tree31011bb17804ec33a0f88c146efe6f5a23b80267
parent9f4210cd80f452685b44c198d5a361ee2b54c05e (diff)
parentb7aa845c018f3b01e70f274a9b30112276a6dcaa (diff)
downloadrails-f08c3f737b7e77a5069dbef9c591c89d163b75d2.tar.gz
rails-f08c3f737b7e77a5069dbef9c591c89d163b75d2.tar.bz2
rails-f08c3f737b7e77a5069dbef9c591c89d163b75d2.zip
Merge pull request #19106 from teeceepee/patch-1
Improve guides [ci skip]
-rw-r--r--guides/source/getting_started.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index 51b8a2ca5f..66cfb72aaf 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -1479,13 +1479,14 @@ Finally, add a 'Destroy' link to your `index` action template
```
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 into your application's layout
-(`app/views/layouts/application.html.erb`) when you generated the application.
-Without this file, the confirmation dialog box wouldn't appear.
+second argument, and then the options as another argument. The `method: :delete`
+and `data: { confirm: 'Are you sure?' }` 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 in your
+application's layout (`app/views/layouts/application.html.erb`) when you
+generated the application. Without this file, the confirmation dialog box won't
+appear.
![Confirm Dialog](images/getting_started/confirm_dialog.png)