Exception: ActiveRecord::RecordNotDestroyed
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
ActiveRecordError ,
StandardError
|
|
Instance Chain:
self,
ActiveRecordError ,
StandardError
|
|
Inherits: |
ActiveRecord::ActiveRecordError
|
Defined in: | activerecord/lib/active_record/errors.rb |
Overview
Raised by {ActiveRecord::Base#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
Class Method Summary
Instance Attribute Summary
- #record readonly
Constructor Details
.new(message = nil, record = nil) ⇒ RecordNotDestroyed
Instance Attribute Details
#record (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/errors.rb', line 162
attr_reader :record