Class: Jbuilder::CollectionRenderer

Inherits:
ActionView::PartialRenderer
  • Object
show all
Includes:
CollectionRenderable
Defined in:
lib/jbuilder/collection_renderer.rb,
lib/jbuilder/collection_renderer.rb

Overview

Rails 6.0 support:

Instance Method Summary collapse

Constructor Details

#initialize(lookup_context, options, &scope) ⇒ CollectionRenderer

Returns a new instance of CollectionRenderer.



70
71
72
73
# File 'lib/jbuilder/collection_renderer.rb', line 70

def initialize(lookup_context, options, &scope)
  super(lookup_context, options)
  @scope = scope
end

Instance Method Details

#render_collection_with_partial(collection, partial, context, block) ⇒ Object



91
92
93
# File 'lib/jbuilder/collection_renderer.rb', line 91

def render_collection_with_partial(collection, partial, context, block)
  render(context, @options.merge(collection: collection, partial: partial), block)
end