Skip to content

Commit

Permalink
Cache pagination total (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
tian-im authored Feb 18, 2024
1 parent 9c7557c commit 81106aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def paginatable?

# @return [Integer] total count for the collection
def total
@collection.unscope(:offset, :limit).count # rubocop:disable CodeReuse/ActiveRecord
@tatal ||= @collection.unscope(:offset, :limit).count # rubocop:disable CodeReuse/ActiveRecord
end

# @return [Integer] page size from parameters or Wallaby configuration
Expand Down

0 comments on commit 81106aa

Please sign in to comment.