1

I'm just wandering when can I safely use Mongoid.override_database. If I use it inside Sidekiq worker is DB going to be changed only for the worked which has called the override_database method?

How about using it in standard Rails controller? Is there any situation where it shouldn't be used (where it could cause problems)?

At first I've used .with(database: 'xyz') when I needed to change the DB, but then I've found out that it doesn't work on relational fields...

xx77aBs
  • 4,678
  • 9
  • 53
  • 77

0 Answers0