Module: Tire::Model::Persistence::Storage::ClassMethods

Defined in:
lib/tire/model/persistence/storage.rb

Instance Method Summary collapse

Instance Method Details

#create(args = {}) ⇒ Object


17
18
19
20
21
22
# File 'lib/tire/model/persistence/storage.rb', line 17

def create(args={})
  document    = new(args)
  return false unless document.valid?
  document.save
  document
end