instance method _set_inline_partial

Ruby on Rails 2.5.0

Since v2.4.1 Last seen in v2.5.0 Private

Available in: v2.4.1 v2.5.0

Signature

_set_inline_partial(name, object, options)

No documentation comment.

Parameters

name req
object req
options req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close