Sha256: 49f320d1e9566c9673ca7ffff40bf1a35d4ee4f6b77ce123dd5e7aa1e15f9349
Contents?: true
Size: 912 Bytes
Versions: 18
Compression:
Stored size: 912 Bytes
Contents
# frozen_string_literal: true module Katalyst module Tables module Collection # Entry point for creating a collection for use with table components. # This class is intended to be subclassed, i.e.: # # class ApplicationController < ActionController::Base # class Collection < Katalyst::Tables::Collection::Base # ... # end # end # # In the context of a controller action, construct a collection, apply it # to a model, then pass the result to the view component: # ``` # collection = Collection.new.with_params(params).apply(People.all) # table = Katalyst::TableComponent.new(collection: collection) # render table # ```` class Base include Core include Pagination include Sorting use(Sorting::Sort) use(Pagination::Paginate) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems