Class: OffsetPaginator
- Inherits:
-
Resourcey::Paginator
- Object
- Resourcey::Paginator
- OffsetPaginator
- Defined in:
- lib/resourcey/paginator.rb
Instance Method Summary collapse
Methods inherited from Resourcey::Paginator
class_for, #initialize, #parse_params, permit_params
Constructor Details
This class inherits a constructor from Resourcey::Paginator
Instance Method Details
#paginate(scope) ⇒ Object
63 64 65 |
# File 'lib/resourcey/paginator.rb', line 63 def paginate(scope) scope.offset(offset).limit(limit) end |
#setup(opts) ⇒ Object
58 59 60 61 |
# File 'lib/resourcey/paginator.rb', line 58 def setup(opts) @offset = opts[:offset] @limit = opts[:limit] end |