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



11
12
13
14
15
# File 'app/formatters/pages_core/link_renderer.rb', line 11

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

#previous_pageObject



5
6
7
8
9
# File 'app/formatters/pages_core/link_renderer.rb', line 5

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