carrierwaveuploader / carrierwave-mongoid

Mongoid support for CarrierWave
MIT License
355 stars 165 forks source link

How do I let my application use 2 different mongo databases. #185

Open kvemula9 opened 6 years ago

kvemula9 commented 6 years ago

We recently upgraded from Rails 3 to Rails 5. So we had to move from carrierwave gem to carrierwave-mongoid. Previously we used to connect to 2 different databases based on which connection the uploader class used and overriding grid_fs_connection (now seemingly gone from mongoid). Mongoid itself supports multiple databases however we are unable to figure out how to override carrierwave-mongoid's use of the default database.