class JbuilderTemplate

def _set_inline_partial(name, object, options)

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