Class: Jbuilder::CollectionRenderer
- Inherits:
-
ActionView::PartialRenderer
- Object
- ActionView::PartialRenderer
- Jbuilder::CollectionRenderer
- Includes:
- CollectionRenderable
- Defined in:
- lib/jbuilder/collection_renderer.rb,
lib/jbuilder/collection_renderer.rb
Overview
Rails 6.0 support:
Instance Method Summary collapse
-
#initialize(lookup_context, options, &scope) ⇒ CollectionRenderer
constructor
A new instance of CollectionRenderer.
- #render_collection_with_partial(collection, partial, context, block) ⇒ Object
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, , &scope) super(lookup_context, ) @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 |