Module: ArDocStore::Model

Defined in:
lib/ar_doc_store/model.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/ar_doc_store/model.rb', line 5

def self.included(mod)
  mod.send :include, ArDocStore::Storage
  mod.send :include, ArDocStore::Embedding
  mod.send :include, InstanceMethods
  mod.after_initialize :assign_json_data
  mod.before_validation :save_json_data
  mod.before_save :ensure_json_data_saved
  mod.before_save :mark_embeds_as_persisted
end