mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
a bit more meaningful method name
This commit is contained in:
parent
c84135bae0
commit
b81bdcb024
3 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ module Kaminari
|
|||
module ActiveRecordRelationMethods
|
||||
extend ActiveSupport::Concern
|
||||
module InstanceMethods
|
||||
def pagination_count
|
||||
def total_count
|
||||
except(:offset, :limit).count
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ module Kaminari
|
|||
def offset_value
|
||||
options[:skip]
|
||||
end
|
||||
def pagination_count
|
||||
def total_count
|
||||
count
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ module Kaminari
|
|||
|
||||
# Total number of pages
|
||||
def num_pages
|
||||
(pagination_count.to_f / limit_value).ceil
|
||||
(total_count.to_f / limit_value).ceil
|
||||
end
|
||||
|
||||
# Current page number
|
||||
|
|
Loading…
Add table
Reference in a new issue