Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/mark_facets/ruby/kaminari.rb,
lib/mark_facets/ruby/will_paginate.rb
Instance Method Summary collapse
- #limit_value ⇒ Object
- #offset_value ⇒ Object
- #to_will_paginate(options = {}) ⇒ Object
- #total_count ⇒ Object
Instance Method Details
#limit_value ⇒ Object
9 10 11 |
# File 'lib/mark_facets/ruby/kaminari.rb', line 9 def limit_value 10 end |
#offset_value ⇒ Object
13 14 15 |
# File 'lib/mark_facets/ruby/kaminari.rb', line 13 def offset_value 0 end |
#to_will_paginate(options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/mark_facets/ruby/will_paginate.rb', line 5 def to_will_paginate( = {}) .reverse_merge!({:page => 1, :per_page => self.size + 1, :total => self.size}) results = WillPaginate::Collection.create([:page], [:per_page], [:total]) do |pager| pager.replace(self) end return results end |
#total_count ⇒ Object
5 6 7 |
# File 'lib/mark_facets/ruby/kaminari.rb', line 5 def total_count self.size end |