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