From 42c6f89c5dfa59ad2f91eb6f9f9da8f49999b03e Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Thu, 17 May 2012 19:17:17 +1000 Subject: [getting started] dialog box is not automatic, is provided through jquery_ujs, which is necessary to have in application layout --- guides/source/getting_started.textile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'guides') diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index 87e3aea2aa..4aeba5debe 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -1129,11 +1129,14 @@ together. Here we're using +link_to+ in a different way. We wrap the -+:action+ and +:id+ attributes in a hash so that we can pass other -arguments to +link_to+. The +:method+ and +:confirm+ ++:action+ and +:id+ attributes in a hash so that we can pass those two keys in +first as one argument, and then the final two keys as another argument. The +:method+ and +:confirm+ options are used as html5 attributes so that when the click is linked, Rails will first show a confirm dialog to the user, and then submit the -link with method +delete+. This is done via javascript automatically. +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. !images/getting_started/confirm_dialog.png(Confirm Dialog)! -- cgit v1.2.3