aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index 523adb3288..96f065cc11 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -172,7 +172,9 @@ module ActionView
# Works like form_remote_tag, but uses form_for semantics.
def remote_form_for(object_name, object, options = {}, &proc)
- form_for(object_name, object, options.merge(:form_tag_selector => :form_remote_tag), &proc)
+ concat form_remote_tag(options), proc.binding
+ fields_for(object_name, object, options, &proc)
+ concat '</form>', proc.binding
end
alias_method :form_remote_for, :remote_form_for