Permalink
Browse files

Validators are no longer run on destroy.

  • Loading branch information...
1 parent 72d36a3 commit 1a6623ed6232c9800ae8592d8d676c2a71f7daac @paulcarey committed Apr 27, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/relaxdb/all_delegator.rb
View
4 lib/relaxdb/all_delegator.rb
@@ -40,7 +40,9 @@ def size
def destroy!
load!
@objs.each { |o| o.data["_deleted"] = true }
- RelaxDB.bulk_save! *@objs
+ # Direct post rather than bulk save as we don't want validators to be run
+ resp = RelaxDB.db.post("_bulk_docs", {"docs" => @objs}.to_json)
+ JSON.parse resp.body
end
end

0 comments on commit 1a6623e

Please sign in to comment.