天天看点

报错处理:更新时:private method `update' called for

出错情况:使用.update方法时报错private method `update' called for

原因:rails 4.0以下版本在做更新时,updaye方法是私有的,

解决方法:更新操作应该使用.update_attributes()方法

继续阅读