Module: Mongoid::CollectionConfigurable::ClassMethods
- Defined in:
- lib/mongoid/collection_configurable.rb
Instance Method Summary collapse
-
#create_collection(force: false) ⇒ Object
Create the collection for the called upon Mongoid model.
Instance Method Details
#create_collection(force: false) ⇒ Object
Create the collection for the called upon Mongoid model.
This method does not re-create existing collections.
If the document includes store_in macro with collection_options key,
these options are used when creating the collection.
22 23 24 25 26 |
# File 'lib/mongoid/collection_configurable.rb', line 22 def create_collection(force: false) Threaded.with_collection_management do perform_create_collection(force: force) end end |