Class: Kaminari::PaginatableArray

Inherits:
Array
  • Object
show all
Defined in:
lib/sunspot_with_kaminari.rb

Overview

Kind of Array that can paginate

Instance Method Summary collapse

Instance Method Details

#set_total(total) ⇒ Object



62
63
64
# File 'lib/sunspot_with_kaminari.rb', line 62

def set_total(total)
  @_total = total
end

#total_countObject

total item numbers of the original array



67
68
69
# File 'lib/sunspot_with_kaminari.rb', line 67

def total_count
  @_total || @_original_array.count
end