aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-12-13 00:39:51 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-12-13 00:39:51 +0000
commite5d9ad3e2903597e708fcb3ad76f08b4a600d82d (patch)
treec677481cd60c2af38655fbcb5d6d71efd9cf126e /actionpack
parentf7e39c4ec78e81c4336a1ef470f3ff0a2430fc7a (diff)
downloadrails-e5d9ad3e2903597e708fcb3ad76f08b4a600d82d.tar.gz
rails-e5d9ad3e2903597e708fcb3ad76f08b4a600d82d.tar.bz2
rails-e5d9ad3e2903597e708fcb3ad76f08b4a600d82d.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index f9da70771d..5e1c6f58a9 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added form_remote_for (form_for meets form_remote_tag) [DHH]
+
* Update to script.aculo.us 1.5.0_rc6
* More robust relative url root discovery for SCGI compatibility. This solves the 'SCGI routes problem' -- you no longer need to prefix all your routes with the name of the SCGI mountpoint. #3070 [Dave Ringoen]
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)