Module: Friendly::Document::Storage

Extended by:
Mixin
Included in:
Friendly::Document
Defined in:
lib/friendly/document/storage.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Mixin

included

Instance Method Details

#destroyObject



54
55
56
# File 'lib/friendly/document/storage.rb', line 54

def destroy
  storage_proxy.destroy(self)
end

#saveObject



50
51
52
# File 'lib/friendly/document/storage.rb', line 50

def save
  new_record? ? storage_proxy.create(self) : storage_proxy.update(self)
end

#storage_proxyObject



58
59
60
# File 'lib/friendly/document/storage.rb', line 58

def storage_proxy
  self.class.storage_proxy
end