Module: Virtuatable::Builders::Helpers::Mongoid
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/virtuatable/builders/helpers/mongoid.rb
Overview
Loads the Mongoid Configuration given the folder from where the application is loaded, and the type of job requiring it (specs or a service basically)
Instance Method Summary collapse
-
#load_mongoid! ⇒ Object
Loads Mongoid configuration file from the standard path.
Instance Method Details
#load_mongoid! ⇒ Object
Loads Mongoid configuration file from the standard path.
16 17 18 19 20 |
# File 'lib/virtuatable/builders/helpers/mongoid.rb', line 16 def load_mongoid! filepath = File.join(@directory, 'config', 'mongoid.yml') filepath = File.readlink(filepath) while File.symlink?(filepath) ::Mongoid.load!(filepath, @mode) end |