rails 中的 after_touch 回调何时被调用

when is after_touch callback in rails called

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

只有当对象被触摸时才会被调用:

object.touch # after_touch will be called

Here 您可以找到更多信息。

创建新对象或更新对象的时间 after_touch 回调有效。