From e5d9ad3e2903597e708fcb3ad76f08b4a600d82d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 13 Dec 2005 00:39:51 +0000 Subject: Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH] Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH] Added form_remote_for (form_for meets form_remote_tag) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/prototype_helper.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 647b05779a..a0f3a6b42d 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -169,7 +169,13 @@ module ActionView tag("form", options[:html], true) end - + + def form_remote_for(object_name, object, options = {}, &proc) + concat(form_remote_tag(options), proc.binding) + fields_for(object_name, object, &proc) + concat(end_form_tag, proc.binding) + end + # Works like form_remote_tag, but uses form_for semantics. def form_remote_for(object_name, object, options = {}, &proc) concat(form_remote_tag(options), proc.binding) -- cgit v1.2.3