Module: Rango::Pagination::PaginationMixin

Defined in:
lib/rango/contrib/pagination/helpers.rb

Instance Method Summary collapse

Instance Method Details

#next_page(text, page) ⇒ Object

Since:

  • 0.0.7



19
20
21
# File 'lib/rango/contrib/pagination/helpers.rb', line 19

def next_page(text, page)
  link_to text, Page.route(request, page, page.next.number)
end

#paginate(page) ⇒ Object

Since:

  • 0.0.2



7
8
9
10
11
# File 'lib/rango/contrib/pagination/helpers.rb', line 7

def paginate(page)
  root = File.dirname(__FILE__)
  template = File.join(root, "pagination")
  partial template, page: page
end

#previous_page(text, page) ⇒ Object

Since:

  • 0.0.7



14
15
16
# File 'lib/rango/contrib/pagination/helpers.rb', line 14

def previous_page(text, page)
  link_to text, Page.route(request, page, page.previous.number)
end