класс ActiveRecord::RecordNotDestroyed
Вызывается методом ActiveRecord::Base#destroy!, если вызов метода #destroy вернёт false.
begin complex_operation_that_internally_calls_destroy! rescue ActiveRecord::RecordNotDestroyed => invalid puts invalid.record.errors end
Атрибуты
record[R]
Публичные Классовые Методы
# File activerecord/lib/active_record/errors.rb, line 164 def initialize(message = nil, record = nil) @record = record super(message) end
Вызывает метод родительского класса
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.