Browse files

[getting started] dialog box is not automatic, is provided through jq…

…uery_ujs, which is necessary to have in application layout
  • Loading branch information...
1 parent 9fc5b45 commit 42c6f89c5dfa59ad2f91eb6f9f9da8f49999b03e @radar radar committed May 17, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 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)!

0 comments on commit 42c6f89

Please sign in to comment.