mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
a04a849d15
commit
a8a1d11d77
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue