mongoid/mongoid — pull request #1825 by ahoward (2012-03-15 16:19:25+00:00)
Title: created_at *exactly* equals updated_at on new records

currently mongoid sets updated_at and created_at incorrectly on new records. that is to say they are different by a handful of milliseconds when, in fact, they should be precisely the same for new records. i recently hit this issue looking for records that had been updated ever: aka created_at!=updated_at and was sad to see that the small difference semantically means that *all* my database records have, apparently, been updated at some point when, in fact, they have not. this small patch fixes this behavior. up next is a patch that implements transactions for mongoid and marks all records created inside one with the same timestamp ;-)