Skip to content

Instantly share code, notes, and snippets.

View madhusudhan518's full-sized avatar
🎯
Focusing

P.V. Madhusudhana rao madhusudhan518

🎯
Focusing
  • COPPERNINE SOFT TECH PVT LTD
  • Hyderabad
View GitHub Profile
If you want to use multiple dbs at once there are several different ways...
1) If you want to do this on a per-model level, use .store_in (This is for all threads):
class Band
include Mongoid::Document
store_in database: "secondary" # This can be any name you want, no need to put it in the mongoid.yml.
end
class Artist