当通过 ActiveRecord::Base#attributes= 方法进行批量赋值时发生多个错误时抛出。异常有一个 errors 属性,其中包含一个 AttributeAssignmentError 对象数组,每个对象对应于为属性赋值时发生的错误。
方法
- N
Attributes
| [R] | errors |
类公共方法
new(errors = nil) 链接
来源: 显示 | 在 GitHub 上
# File activerecord/lib/active_record/errors.rb, line 473 def initialize(errors = nil) @errors = errors end