mirror of
https://github.com/github/rails.git
synced 2026-01-30 00:38:00 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user