Module: Believer::Persistence

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/believer/persistence.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#destroyObject



26
27
28
# File 'lib/believer/persistence.rb', line 26

def destroy
  Delete.new(:record_class => self.class).where(key_values).execute
end

#saveObject

Saves the model.



22
23
24
# File 'lib/believer/persistence.rb', line 22

def save
  Insert.new(:record_class => self.class, :values => self).execute
end