class ViewComponent::Base
def with_collection(collection, spacer_component: nil, **args)
-
args
(Arguments
) -- Arguments to pass to the ViewComponent every time. -
spacer_component
(ViewComponent::Base
) -- Component instance to be rendered between items. -
collection
(Enumerable
) -- A list of items to pass the ViewComponent one at a time.
def with_collection(collection, spacer_component: nil, **args) Collection.new(self, collection, spacer_component, **args) end