Module: MassiveRecord::ORM::Persistence::ClassMethods

Defined in:
lib/massive_record/orm/persistence.rb

Instance Method Summary collapse

Instance Method Details

#create(*args) ⇒ Object



10
11
12
13
14
# File 'lib/massive_record/orm/persistence.rb', line 10

def create(*args)
  new(*args).tap do |record|
    record.save
  end
end

#destroy_allObject



16
17
18
# File 'lib/massive_record/orm/persistence.rb', line 16

def destroy_all
  all.each { |record| record.destroy }
end