跳至内容 跳至搜索

在通过 ActiveRecord::Base#attributes= 方法对属性执行批量赋值时发生错误时引发。异常具有一个 attribute 属性,该属性是违规属性的名称。

方法
N

属性

[R] attribute
[R] exception

类公共方法

new(message = nil, exception = nil, attribute = nil)

# File activerecord/lib/active_record/errors.rb, line 425
def initialize(message = nil, exception = nil, attribute = nil)
  super(message)
  @exception = exception
  @attribute = attribute
end