Method: Kaminari.paginate_array

Defined in:
lib/kaminari/models/array_extension.rb

.paginate_array(array, limit: nil, offset: nil, total_count: nil, padding: nil) ⇒ Object

Wrap an Array object to make it paginatable

Options

  • :limit - limit

  • :offset - offset

  • :total_count - total_count

  • :padding - padding



70
71
72
# File 'lib/kaminari/models/array_extension.rb', line 70

def self.paginate_array(array, limit: nil, offset: nil, total_count: nil, padding: nil)
  PaginatableArray.new array, limit: limit, offset: offset, total_count: total_count, padding: padding
end