logo
首页技术栈工具库讨论
do_not_want

do_not_want

Several methods in ActiveRecord skip validations, callbacks, or both. In my extremely humble but also extremely correct opinion, it's too easy to accidentally use these. Do Not Want kills those methods dead so you won't cut yourself on them: >> User.new.update_attribute(:foo, 5) DoNotWant::NotSafe: User#update_attribute isn't safe because it skips validation
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
RUBYGEMS
gem install do_not_want
查看
标签
根据用户添加的标签生成
暂无标签