Module: Concerns::Storable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Translatable
- Defined in:
- app/models/concerns/storable.rb,
app/models/concerns/storable/config.rb,
app/models/concerns/storable/collection.rb
Defined Under Namespace
Modules: ClassMethods
Classes: Collection, Config
Instance Method Summary
collapse
Instance Method Details
#storable? ⇒ Boolean
13
14
15
|
# File 'app/models/concerns/storable.rb', line 13
def storable?
true
end
|
#store(collection = :default) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
|
# File 'app/models/concerns/storable.rb', line 17
def store(collection = :default)
@store_collections = {} unless @store_collections
unless @store_collections[collection.to_sym]
@store_collections[collection.to_sym] = Concerns::Storable::Collection.new(
self, collection, self.class.store_config
)
end
@store_collections[collection.to_sym]
end
|