何时在rails中调用after_touch回调

Hel*_*boy 3 activerecord ruby-on-rails callback

after_touch回调如何在Rails中运行?是在更新对象时还是仅在创建新对象时调用?

Mar*_*rez 8

只有在触摸对象时才会调用它:

object.touch # after_touch will be called
Run Code Online (Sandbox Code Playgroud)

在这里你可以找到更多信息.