我有一个 after_save 过滤器,我不想在特定实例中触发它。有没有类似于 save_without_validation 的方法?
谢谢,
最佳答案
使用 rails 2 时,可以调用私有(private)方法 create_without_callbacks
通过做:
@my_obj.send(:create_without_callbacks)
关于ruby-on-rails - rails : Is there an equivalent to save_without_validation which skips after_save filters?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/315724/