instance method
retrieve_object
Ruby on Rails 3.2.22.5
Since v3.1.12 Last seen in v3.2.22.5Available in: v3.1.12 v3.2.22.5
Signature
retrieve_object(object)
No documentation comment.
Parameters
-
objectreq
Source
# File actionpack/lib/action_view/helpers/form_helper.rb, line 1122
def retrieve_object(object)
if object
object
elsif @template_object.instance_variable_defined?("@#{@object_name}")
@template_object.instance_variable_get("@#{@object_name}")
end
rescue NameError
# As @object_name may contain the nested syntax (item[subobject]) we need to fallback to nil.
nil
end
Defined in actionpack/lib/action_view/helpers/form_helper.rb line 1122
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::InstanceTag