“As you mention in your question and DGM suggests, Rails will update the timestamps when creating or updating, so sticking your code in before_create and before_update should work.”

kent-where-the-light-iskent-where-the-light-is のブックマーク 2016/12/01 17:49

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Which callback does ActiveRecord use to record timestamp?

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう