Class: Sequel::Dataset

Inherits:
Object
  • Object
show all
Defined in:
lib/easycomments/ec_pagination.rb

Instance Method Summary collapse

Instance Method Details

#page(page, per_page = COMMENTS_PER_PAGE || 10, *args) ⇒ Object



13
14
15
16
17
# File 'lib/easycomments/ec_pagination.rb', line 13

def page(page, per_page=COMMENTS_PER_PAGE || 10, *args)
  page = page.to_i
  page = 1 if page < 1
  paginate(page, per_page, *args)
end