lib/volt/models/persistors/model_store.rb in volt-0.9.6.pre2 vs lib/volt/models/persistors/model_store.rb in volt-0.9.6.pre3
- old
+ new
@@ -162,16 +162,12 @@
@@db ||= Volt::DataStore.fetch
end
# Do the actual writing of data to the database, only runs on the backend.
def save_to_db!(values)
- # puts "SAVE TO DB: #{values.inspect}"
# Check to make sure the model has no validation errors.
errors = @model.errors
return errors if errors.present?
-
- # Passed, save it
- id = values[:id]
# Try to create
update_result = db.update(collection, values)
# An error hash will be returned if the update doesn't work