Overview
class Shop::Pages::Products::Index < Matestack::Ui::Page
include Matestack::Ui::VueJs::Components::Collection::Helper
def prepare
@collection_id = 'products-collection'
@collection = set_collection(
id: @collection_id,
data: Products.all
)
end
def response
async id: 'product-collection', rerender_on: "#{@collection_id}-update" do
collection_content @collection.config do
@collection.data.each do |product|
paragraph product.name
end
end
end
end
endPagination
Filtering
Ordering
Using actions in collections
Last updated
Was this helpful?