aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorYu Haidong <yuhaidongyhd@gmail.com>2015-02-27 11:26:10 +0800
committerYu Haidong <yuhaidongyhd@gmail.com>2015-02-27 11:26:10 +0800
commitffda39f3643033dca1bbb5ca8bc990f46dbec95c (patch)
tree23b57c37382ae832928be3760ea76d058c1e01ce /guides
parent714205988315d2f98aa3e749747c44470e18676b (diff)
downloadrails-ffda39f3643033dca1bbb5ca8bc990f46dbec95c.tar.gz
rails-ffda39f3643033dca1bbb5ca8bc990f46dbec95c.tar.bz2
rails-ffda39f3643033dca1bbb5ca8bc990f46dbec95c.zip
Improve guides
Diffstat (limited to 'guides')
-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..e6c7965007 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 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.
![Confirm Dialog](images/getting_started/confirm_dialog.png)