I have a Sinatra/Mongoid application and I noticed that my mongoid model/object does not complain or error out if I try to insert a duplicate _id object. The object.errors collection is empty as well.
“Object/record is not inserted.”
On Mongo console I do get a “duplicate key error index” error.
Anyone know whats going on?
Mongo updates/inserts are somewhat “fire&forget” by default. You can however turn on safe mode which should raise errors when this sort of stuff happens