Is it possible to know if a model is being saved/created/updated by a rake task? For example, I need to disable a before_save callback if the model is being saved by a rake task. Thanks!
问问题
144 次
Is it possible to know if a model is being saved/created/updated by a rake task? For example, I need to disable a before_save callback if the model is being saved by a rake task. Thanks!