Module: Mongoid::Clients::StorageOptions::ClassMethods
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Extended In:
| |
| Defined in: | lib/mongoid/clients/storage_options.rb |
Instance Method Summary
-
#reset_storage_options!
Reset the store_in options.
-
#storage_options_defaults ⇒ Hash
Get the default storage options.
-
#store_in(options) ⇒ Class
Give this model specific custom default storage options.
Instance Method Details
#reset_storage_options!
Reset the store_in options
# File 'lib/mongoid/clients/storage_options.rb', line 92
def self. = .dup PersistenceContext.clear(self) end
#storage_options_defaults ⇒ Hash
Get the default storage options.
# File 'lib/mongoid/clients/storage_options.rb', line 103
def { collection: name.collectionize.to_sym, client: :default } end
#store_in(options) ⇒ Class
Give this model specific custom default storage options.
# File 'lib/mongoid/clients/storage_options.rb', line 83
def store_in() Validators::Storage.validate(self, ) self. = self..merge() end