diff --git a/lib/esse/active_record/collection.rb b/lib/esse/active_record/collection.rb index 06b0a65..a7c7852 100644 --- a/lib/esse/active_record/collection.rb +++ b/lib/esse/active_record/collection.rb @@ -90,7 +90,7 @@ def each_batch_ids end def count - dataset.except(:includes, :preload, :eager_load).count + dataset.except(:includes, :preload, :eager_load, :order, :limit, :offset).count end alias_method :size, :count