Module: BazaModels::Model::Manipulation::ClassMethods

Defined in:
lib/baza_models/model/manipulation.rb

Instance Method Summary collapse

Instance Method Details

#create(data = {}) ⇒ Object



113
114
115
116
117
# File 'lib/baza_models/model/manipulation.rb', line 113

def create(data = {})
  model = new(data)
  model.save
  model
end

#create!(data = {}) ⇒ Object



119
120
121
122
123
# File 'lib/baza_models/model/manipulation.rb', line 119

def create!(data = {})
  model = new(data)
  model.save!
  model
end