[英]Difference between save and sneaky_save in rails
What is the difference between save and sneaky_save in rails? rails中的save和sneaky_save有什么区别?
object.save
and object.sneaky_save
object.save
和object.sneaky_save
save
- is ActiveRecord
method, sneaky_save
- is a method from the gem sneaky-save . save
- 是ActiveRecord
方法, sneaky_save
- 是 gem偷偷保存的方法。 It's a ActiveRecord extension, that allows saving records without calling callbacks and validations.这是一个 ActiveRecord 扩展,允许在不调用回调和验证的情况下保存记录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.