1
0
Fork 0
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:
Akira Matsuda 2011-02-21 03:58:35 +09:00
parent c84135bae0
commit b81bdcb024
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -8,7 +8,7 @@ module Kaminari
def offset_value
options[:skip]
end
def pagination_count
def total_count
count
end
end

View file

@ -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