rails跳过回调的方法

rails中的回调可跳过,使用下列方法即可:

decrement

decrement_counter

delete delete_all

increment

increment_counter

toggle touch

update_column

update_columns

update_all

update_counters

使用这些方法是要特别留心,因为重要的业务逻辑可能在回调中完成。如果没弄懂回调的作用直接跳过,可能导致数据不合法。

原文地址:https://www.cnblogs.com/wangyuyu/p/3836493.html