Method: Mongoid::Config#load!
- Defined in:
- lib/mongoid/config.rb
#load!(path, environment = nil) ⇒ Object
Load the settings from a compliant mongoid.yml file. This can be used for easy setup with frameworks other than Rails.
88 89 90 91 92 93 94 95 96 |
# File 'lib/mongoid/config.rb', line 88 def load!(path, environment = nil) settings = Environment.load_yaml(path, environment) if settings.present? Sessions.disconnect Sessions.clear load_configuration(settings) end settings end |