Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/brick_layer/extensions.rb
Instance Method Summary collapse
Instance Method Details
#paginate(options = {:page => 1, :per_page => 50}) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/brick_layer/extensions.rb', line 2 def paginate(={:page => 1, :per_page => 50}) page = [:page] per_page = [:per_page] self[((page - 1) * per_page)...(page * per_page)] end |