Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3491

Example configuration does not work

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • 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.

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

              Created:
              Updated:
              Resolved: