From ffda39f3643033dca1bbb5ca8bc990f46dbec95c Mon Sep 17 00:00:00 2001 From: Yu Haidong Date: Fri, 27 Feb 2015 11:26:10 +0800 Subject: Improve guides --- guides/source/getting_started.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'guides/source/getting_started.md') 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) -- cgit v1.2.3 From b7aa845c018f3b01e70f274a9b30112276a6dcaa Mon Sep 17 00:00:00 2001 From: Yu Haidong Date: Mon, 2 Mar 2015 22:30:59 +0800 Subject: Modify guides for a better sounding sentence --- 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 e6c7965007..66cfb72aaf 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1483,10 +1483,10 @@ 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 +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 -wouldn't appear. +generated the application. Without this file, the confirmation dialog box won't +appear. ![Confirm Dialog](images/getting_started/confirm_dialog.png) -- cgit v1.2.3