From eb2d32f30916c57f3011480e12772dd801f67070 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Mon, 25 Jan 2010 21:25:51 -0500 Subject: remote_form_for now supports :confirm --- actionpack/lib/action_view/helpers/ajax_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 52b7db4de9..1a396215fc 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -56,6 +56,11 @@ module ActionView # See FormHelper#form_for for additional semantics. def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! + + if confirm = options.delete(:confirm) + add_confirm_to_attributes!(options, confirm) + end + object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) concat(form_remote_tag(options)) -- cgit v1.2.3