Updating timestamps in mongoid
How do I update/change the TimestampSequence on a Mongoid document in rails/ruby? If you dont know in Mongoid but know in MongoDB that开发者_如何学编程 will work as well.
The class is Mongoid::TimestampSequence
Thanks in advance
Try this:
Document.where(somecriteriahere: "criteriavaluehere").update_all(
updated_at: Time.now.to_s)
精彩评论