diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-12 00:28:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-02-12 00:28:45 +0000 |
commit | a8a1d11d77694d6e49552de9291b4bfdb299494f (patch) | |
tree | 509bfa0d36513e6f4a930bd449bc75602841c481 | |
parent | a04a849d155997d0c3a6fcae4688a45c421e7a00 (diff) | |
download | rails-a8a1d11d77694d6e49552de9291b4bfdb299494f.tar.gz rails-a8a1d11d77694d6e49552de9291b4bfdb299494f.tar.bz2 rails-a8a1d11d77694d6e49552de9291b4bfdb299494f.zip |
Expose object and object_name from the FormBuilder [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index ab387b7bf8..2449629ead 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -371,11 +371,13 @@ module ActionView end end - class FormBuilder + class FormBuilder #:nodoc: # The methods which wrap a form helper call. class_inheritable_accessor :field_helpers self.field_helpers = (FormHelper.instance_methods - ['form_for']) - + + attr_accessor :object_name, :object + def initialize(object_name, object, template, options, proc) @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc end |