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:
parent
6145e2f5b3
commit
b61d5a6568
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue