Sha256: 014acd3ae622a836fa9924ddb6d0a86da1d8ec37d877bc0f8cb6a63323a5c3c8

Contents?: true

Size: 413 Bytes

Versions: 156

Compression:

Stored size: 413 Bytes

Contents

module Paginator
  extend ActiveSupport::Concern
  module ClassMethods
    def list(per_page = DEFAULT_PER_PAGE, page = nil, _filter_params = nil, total_count = nil)
      paginated_list = {}
      per_page = DEFAULT_PER_PAGE if per_page == 0
      paginated_list[:list] = self.page(page || 1).per(per_page)
      paginated_list[:total_count] = total_count
      FilteredList.new(paginated_list)
    end
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
cm-admin-4.4.8 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.4.6 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.4.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.4.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.3.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.2.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.2.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.1.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.1.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.1.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-4.0.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.16 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.15 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.14 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.13 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.12 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.11 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.10 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.9 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.8 lib/generators/cm_admin/templates/concerns/paginator.rb