在通过 ActiveRecord::Base#attributes= 方法对属性执行批量赋值时发生错误时引发。异常具有一个 attribute
属性,该属性是违规属性的名称。
方法
- N
属性
[R] | attribute | |
[R] | exception |
类公共方法
new(message = nil, exception = nil, attribute = nil) 链接
源:显示 | 在 GitHub 上
# File activerecord/lib/active_record/errors.rb, line 425 def initialize(message = nil, exception = nil, attribute = nil) super(message) @exception = exception @attribute = attribute end