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-2.4.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.4.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.3.4 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.3.3 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.3.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.3.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.3.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.2.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.2.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.5 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.4 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.3 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.1.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.0.2 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.0.1 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-2.0.0 lib/generators/cm_admin/templates/concerns/paginator.rb
cm-admin-1.5.56 lib/generators/cm_admin/templates/concerns/paginator.rb