I am writing a migration for a Rails application that uses MongoDB and Mongoid. My migration currently uses my models that use Mongoid to query and update records, but the p
For Mongoid 6:
db = Mongoid::default_client collection = db[:collection_name]