diff --git a/lib/bullet/mongoid8x.rb b/lib/bullet/mongoid8x.rb index 31c538a6..f1d250dd 100644 --- a/lib/bullet/mongoid8x.rb +++ b/lib/bullet/mongoid8x.rb @@ -8,14 +8,14 @@ def self.enable alias_method :origin_each, :each alias_method :origin_eager_load, :eager_load - def first(opts = {}) - result = origin_first(opts) + def first(limit = nil) + result = origin_first(limit) Bullet::Detector::NPlusOneQuery.add_impossible_object(result) if result result end - def last(opts = {}) - result = origin_last(opts) + def last(limit = nil) + result = origin_last(limit) Bullet::Detector::NPlusOneQuery.add_impossible_object(result) if result result end