Permalink
Browse files

remote_form_for now supports :confirm

  • Loading branch information...
1 parent ed09413 commit eb2d32f30916c57f3011480e12772dd801f67070 @erikstmartin erikstmartin committed with stefanpenner Jan 26, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -56,6 +56,11 @@ module AjaxHelper
# 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))

0 comments on commit eb2d32f

Please sign in to comment.