2011-09-24 107 views
0

如何在rails/ruby​​中更新/更改Mongoid文檔上的TimestampSequence? 如果你不知道在Mongoid中,但知道在MongoDB中也可以。更新mongoid中的時間戳

類是Mongoid :: TimestampSequence提前

感謝

回答

0

試試這個:

Document.where(somecriteriahere: "criteriavaluehere").update_all(
    updated_at: Time.now.to_s)