instance method
_set_inline_partial
Ruby on Rails 2.9.1
Since v2.6.4 Last seen in v2.14.1Signature
_set_inline_partial(name, object, options)
No documentation comment.
Parameters
-
namereq -
objectreq -
optionsreq
Source
# File lib/jbuilder/jbuilder_template.rb, line 184
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_with_options options.merge(locals: locals) }
end
set! name, value
end
Defined in lib/jbuilder/jbuilder_template.rb line 184
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Object