Permalink
Browse files

#fix

  • Loading branch information...
alexeypetrushin committed Apr 11, 2012
1 parent 0d4ee34 commit 338c830d59cf0b6bfba65a1df3ada37a771bcb4d
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/collection.coffee
View
@@ -88,13 +88,14 @@ class Driver.Collection
doc = helper.convertDocIdToDriver doc
callback args...
- delete: (first, options..., callback) ->
- options = options[0] || {}
+ delete: (args..., callback) ->
+ [first, second] = args
selector = if first.isModel
id = helper.getId(first) || throw new Error "can't delete model without id!"
{id: id}
else
first
+ options = second || {}
# Adding default options.
options = _.extend {safe: Driver.safe}, options

0 comments on commit 338c830

Please sign in to comment.