Collection
Usage
class Shop::Pages::Products::Index < Matestack::Ui::Page
include Matestack::Ui::Core::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 text: product.name
end
end
end
end
endPagination
Filtering
Ordering
Complete documentation
Last updated
Was this helpful?