lib/couch_potato/database.rb in speedmax-couch_potato-0.2.0 vs lib/couch_potato/database.rb in speedmax-couch_potato-0.2.2

- old
+ new

@@ -1,9 +1,9 @@ module CouchPotato class Database - class ValidationsFailedError < ::Exception; end + class ValidationsFailedError < ::StandardError; end def initialize(couchrest_database) @database = couchrest_database end @@ -13,10 +13,10 @@ spec.reduce_function).query_view!(spec.view_parameters) spec.process_results results end def save_document(document) - return unless document.dirty? + return true unless document.dirty? if document.new? create_document document else update_document document end \ No newline at end of file