Module: Pragma::Decorator::Pagination
- Defined in:
- lib/pragma/decorator/pagination.rb,
lib/pragma/decorator/pagination/adapter.rb,
lib/pragma/decorator/pagination/adapter/base.rb,
lib/pragma/decorator/pagination/adapter/kaminari.rb,
lib/pragma/decorator/pagination/adapter/will_paginate.rb
Overview
Pagination provides support for including pagination metadata in your collection.
It is particularly useful when used in conjunction with Collection.
It supports both Kaminari and will_paginate.
Defined Under Namespace
Modules: Adapter, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/pragma/decorator/pagination.rb', line 95 def self.included(klass) klass.include InstanceMethods klass.class_eval do property :total_entries, exec_context: :decorator property :per_page, exec_context: :decorator property :total_pages, exec_context: :decorator property :previous_page, exec_context: :decorator property :current_page, exec_context: :decorator property :next_page, exec_context: :decorator end end |