-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I am configuring Mongoid for testing a gem that depends on Mongoid. The API docs give an example config:
Mongoid.configure do |config| config.allow_dynamic_fields = false config.use(name: "mongoid_test", host: "localhost", port: 27017) end
However, I get undefined method 'use' for Mongoid::Config:Module. Browsing the code it looks like there's an easy way specifically designed for what I'm doing:
Mongoid.configure do |config| config.connect_to('mongoid_test') end
Not sure if the docs are old or if I was doing it wrong. Just thought I'd mention it.