aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorErik St. Martin <alakriti@gmail.com>2010-01-25 21:25:51 -0500
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:34 -0600
commiteb2d32f30916c57f3011480e12772dd801f67070 (patch)
tree7f0ed0aeb3da713c9f5af909c8a182a817cb5866 /actionpack
parented094132306061ea98168fb6424fa86a4f49e33b (diff)
downloadrails-eb2d32f30916c57f3011480e12772dd801f67070.tar.gz
rails-eb2d32f30916c57f3011480e12772dd801f67070.tar.bz2
rails-eb2d32f30916c57f3011480e12772dd801f67070.zip
remote_form_for now supports :confirm
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb5
1 files changed, 5 insertions, 0 deletions
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))