Class: RoarExtensions::KaminariShim
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- RoarExtensions::KaminariShim
- Defined in:
- lib/roar_extensions/kaminari_shim.rb
Instance Method Summary collapse
- #next_page ⇒ Object
- #per_page ⇒ Object
- #previous_page ⇒ Object
- #total_entries ⇒ Object
- #total_pages ⇒ Object
Instance Method Details
#next_page ⇒ Object
7 8 9 |
# File 'lib/roar_extensions/kaminari_shim.rb', line 7 def next_page last_page? ? nil : current_page + 1 end |
#per_page ⇒ Object
3 4 5 |
# File 'lib/roar_extensions/kaminari_shim.rb', line 3 def per_page limit_value end |
#previous_page ⇒ Object
11 12 13 |
# File 'lib/roar_extensions/kaminari_shim.rb', line 11 def previous_page first_page? ? nil : current_page - 1 end |
#total_entries ⇒ Object
19 20 21 |
# File 'lib/roar_extensions/kaminari_shim.rb', line 19 def total_entries total_count end |
#total_pages ⇒ Object
15 16 17 |
# File 'lib/roar_extensions/kaminari_shim.rb', line 15 def total_pages num_pages end |