Module: Mongoid::Clients::StorageOptions::ClassMethods
- Defined in:
- build/mongoid-8.1/lib/mongoid/clients/storage_options.rb
Instance Method Summary collapse
-
#reset_storage_options! ⇒ Object
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! ⇒ Object
Reset the store_in options
56 57 58 59 |
# File 'build/mongoid-8.1/lib/mongoid/clients/storage_options.rb', line 56 def self. = .dup PersistenceContext.clear(self) end |
#storage_options_defaults ⇒ Hash
Get the default storage options.
67 68 69 70 71 72 |
# File 'build/mongoid-8.1/lib/mongoid/clients/storage_options.rb', line 67 def { collection: name.collectionize.to_sym, client: :default } end |
#store_in(options) ⇒ Class
Give this model specific custom default storage options.
47 48 49 50 |
# File 'build/mongoid-8.1/lib/mongoid/clients/storage_options.rb', line 47 def store_in() Validators::Storage.validate(self, ) self. = self..merge() end |