diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 8 |
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) |