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 5:
db = Mongoid::Clients.default collection = db[:collection_name]
Now we can perform queries on the collection