123456789_123456789_123456789_123456789_123456789_

Exception: ActiveRecord::RecordNotSaved

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#save!} and {ActiveRecord::Base.update_attribute!} methods when a record is failed to validate or cannot be saved due to any of the before_* callbacks throwing :abort. See Callbacks for further details

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(message = nil, record = nil) ⇒ RecordNotSaved

[ GitHub ]

  
# File 'activerecord/lib/active_record/errors.rb', line 139

def initialize(message = nil, record = nil)
  @record = record
  super(message)
end

Instance Attribute Details

#record (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/errors.rb', line 137

attr_reader :record