在透過 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 452 def initialize(message = nil, exception = nil, attribute = nil) super(message) @exception = exception @attribute = attribute end