Sha256: d257dcb781cc02668cb751d076a0fbf2e0d008a1ecf85d0f26c47cc4bfabee95
Contents?: true
Size: 615 Bytes
Versions: 11
Compression:
Stored size: 615 Bytes
Contents
require 'active_support' class LHS::Record module Pagination extend ActiveSupport::Concern # Kaminari-Interface delegate :current_page, :first_page, :last_page, :prev_page, :next_page, :limit_value, :total_pages, to: :_pagination def _pagination self.class.pagination(_data) end module ClassMethods def pagination(data) case data._record.pagination_strategy.to_sym when :page PagePagination.new(data) when :start StartPagination.new(data) else OffsetPagination.new(data) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems