Class: Liquor::Pagination::Scope
- Inherits:
-
Drop::Scope
- Object
- Drop::Scope
- Liquor::Pagination::Scope
- Defined in:
- lib/liquor/extensions/pagination.rb
Instance Attribute Summary
Attributes inherited from Drop::Scope
Instance Method Summary collapse
Methods inherited from Drop::Scope
#[], #count, #each, #entity, #except, #find_all_by, #find_by, #find_except_by, #first, #include?, #initialize, #last, #limit, #offset, #pluck, #reverse, #to_a
Methods included from External
Constructor Details
This class inherits a constructor from Liquor::Drop::Scope
Instance Method Details
#per_page(size) ⇒ Object
137 138 139 |
# File 'lib/liquor/extensions/pagination.rb', line 137 def per_page(size) @source.per(size).to_drop end |
#total_entries ⇒ Object
133 134 135 |
# File 'lib/liquor/extensions/pagination.rb', line 133 def total_entries @source.total_count end |