- 博客(2)
- 收藏
- 关注
转载 Active Record回调
Active Record回调 可用的回调 创建对象时:before_validation, after_validation, before_save, around_save, before_create, around_create, after_create, after_save, after_commit/after_rollback 更新对象时:before_validation, ...
2019-07-09 11:24:36 138
转载 Rails数据验证
Rails文档阅读数据验证概览数据验证辅助方法条件验证自定义验证 数据验证 概览 会触发数据验证的方法:create, create!, save, save!, update, update! 会跳过验证,不管验证是否通过都会把对象存入数据库的方法:decrement!, decrement_counter, increment!, increment_counter, toggle!, tou...
2019-07-02 11:33:18 637
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人