Module: Architect4r::Model::Persistency::ClassMethods

Defined in:
lib/architect4r/model/persistency.rb

Instance Method Summary collapse

Instance Method Details

#create(*args, &block) ⇒ Object



59
60
61
62
63
# File 'lib/architect4r/model/persistency.rb', line 59

def create(*args, &block)
  instance = new(*args, &block)
  instance.create
  instance
end

#create!(*args, &block) ⇒ Object

Defines an instance and save it directly to the database



66
67
68
69
70
# File 'lib/architect4r/model/persistency.rb', line 66

def create!(*args, &block)
  instance = new(*args, &block)
  instance.create!
  instance
end