ActiveRecord::RecordNotDestroyed

class ActiveRecord::RecordNotDestroyed

Parent:
ActiveRecord::ActiveRecordError

Raised by ActiveRecord::Persistence#destroy! when a call to destroy would return false.

begin
  complex_operation_that_internally_calls_destroy!
rescue ActiveRecord::RecordNotDestroyed => invalid
  puts invalid.record.errors
end

Attributes

record[R]
登录查看完整内容