提交 42c6f89c 编写于 作者: R Ryan Bigg

[getting started] dialog box is not automatic, is provided through jquery_ujs,...

[getting started] dialog box is not automatic, is provided through jquery_ujs, which is necessary to have in application layout
上级 9fc5b456
......@@ -1129,11 +1129,14 @@ together.
</erb>
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)!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册