1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

last_page? and first_page? added

This commit is contained in:
Aurélien AMILIN 2011-03-05 19:32:15 +01:00 committed by Akira Matsuda
parent 6145e2f5b3
commit b61d5a6568

View file

@ -21,6 +21,16 @@ module Kaminari
def current_page
(offset_value / limit_value) + 1
end
# First page of the collection ?
def first_page?
current_page == 1
end
# Last page of the collection?
def last_page?
current_page == num_pages
end
end
end
end