Example configuration does not work

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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.

              Assignee:
              Durran Jordan
              Reporter:
              Andrew Havens
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: