class ActiveAdmin::Views::PaginatedCollection
def build(collection, options = {})
download_links => Download links override (false or [:csv, :pdf])
param_name => Parameter name for page number in the links (:page by default)
params => Extra parameters for pagination (e.g. { anchor: 'details' })
entry_name => The name to display for this resource collection
options => These options will be passed to `page_entries_info`
collection => A paginated collection from kaminari
Builds a new paginated collection component
def build(collection, options = {}) @collection = collection @params = options.delete(:params) @param_name = options.delete(:param_name) @download_links = options.delete(:download_links) @display_total = options.delete(:pagination_total) { true } @per_page = options.delete(:per_page) unless collection.respond_to?(:total_pages) raise(StandardError, "Collection is not a paginated scope. Set collection.page(params[:page]).per(10) before calling :paginated_collection.") end @contents = div(class: "paginated_collection_contents") build_pagination_with_formats(options) @built = true end