Skip to content

Commit

Permalink
Expose object and object_name from the FormBuilder [DHH]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 12, 2006
1 parent a04a849 commit a8a1d11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actionpack/lib/action_view/helpers/form_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -371,11 +371,13 @@ def tag_id_with_index(index)
end end
end end


class FormBuilder class FormBuilder #:nodoc:
# The methods which wrap a form helper call. # The methods which wrap a form helper call.
class_inheritable_accessor :field_helpers class_inheritable_accessor :field_helpers
self.field_helpers = (FormHelper.instance_methods - ['form_for']) self.field_helpers = (FormHelper.instance_methods - ['form_for'])


attr_accessor :object_name, :object

def initialize(object_name, object, template, options, proc) def initialize(object_name, object, template, options, proc)
@object_name, @object, @template, @options, @proc = object_name, object, template, options, proc @object_name, @object, @template, @options, @proc = object_name, object, template, options, proc
end end
Expand Down

0 comments on commit a8a1d11

Please sign in to comment.