instance method
_set_inline_partial
Ruby on Rails 2.4.1
Since v2.4.1 Last seen in v2.5.0 PrivateAvailable in: v2.4.1 v2.5.0
Signature
_set_inline_partial(name, object, options)
No documentation comment.
Parameters
-
namereq -
objectreq -
optionsreq
Source
# File lib/jbuilder/jbuilder_template.rb, line 132
def _set_inline_partial(name, object, options)
value = if object.nil?
[]
elsif _is_collection?(object)
_scope{ _render_partial_with_options options.merge(collection: object) }
else
locals = ::Hash[options[:as], object]
_scope{ _render_partial options.merge(locals: locals) }
end
set! name, value
end
Defined in lib/jbuilder/jbuilder_template.rb line 132
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in JbuilderTemplate