Sha256: 014acd3ae622a836fa9924ddb6d0a86da1d8ec37d877bc0f8cb6a63323a5c3c8

Contents?: true

Size: 413 Bytes

Versions: 144

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

144 entries across 144 versions & 1 rubygems

Version Path
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
cm-admin-3.0.7 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.6 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.5 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.4 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.3 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-3.0.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.6 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.5 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.4 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.3 lib/generators/cm_admin/templates/concerns/paginator.rb