Class: PagesCore::LinkRenderer

Inherits:
WillPaginate::ActionView::LinkRenderer
  • Object
show all
Defined in:
app/formatters/pages_core/link_renderer.rb

Instance Method Summary collapse

Instance Method Details

#next_pageObject


9
10
11
12
13
# File 'app/formatters/pages_core/link_renderer.rb', line 9

def next_page
  num = @collection.current_page < total_pages &&
        @collection.current_page + 1
  previous_or_next_page(num, "Next", "next")
end

#previous_pageObject


3
4
5
6
7
# File 'app/formatters/pages_core/link_renderer.rb', line 3

def previous_page
  num = @collection.current_page > 1 &&
        @collection.current_page - 1
  previous_or_next_page(num, "Previous", "previous")
end