lib/moped/collection.rb in moped-1.0.0.rc vs lib/moped/collection.rb in moped-1.0.0
- old
+ new
@@ -20,10 +20,14 @@
#
# @return [ Hash ] The command information.
#
# @since 1.0.0
def drop
- database.command(drop: name)
+ begin
+ database.command(drop: name)
+ rescue Moped::Errors::OperationFailure => e
+ false
+ end
end
# Build a query for this collection.
#
# @example Build a query based on the provided selector.