class ViewComponent::Collection
def component_options(item, iterator)
def component_options(item, iterator) item_options = {component.collection_parameter => item} item_options[component.collection_counter_parameter] = iterator.index if component.counter_argument_present? item_options[component.collection_iteration_parameter] = iterator.dup if component.iteration_argument_present? @options.merge(item_options) end