Sha256: 2ef5dc106d70744780b972d9269bb2276d2348921e35d61f086aac51cf5cae14
Contents?: true
Size: 666 Bytes
Versions: 80
Compression:
Stored size: 666 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_class case pagination_strategy.to_sym when :page LHS::Pagination::Page when :start LHS::Pagination::Start else LHS::Pagination::Offset end end def pagination(data) pagination_class.new(data) end end end end
Version data entries
80 entries across 80 versions & 1 rubygems