Method: MongoMapper::Plugins::Associations::ManyDocumentsProxy#create!

Defined in:
lib/mongo_mapper/plugins/associations/many_documents_proxy.rb

#create!(attrs = {}) ⇒ Object



66
67
68
69
70
71
# File 'lib/mongo_mapper/plugins/associations/many_documents_proxy.rb', line 66

def create!(attrs={})
  doc = klass.new(attrs)
  apply_scope(doc).save!
  reset
  doc
end