W3cubDocs

/Ruby on Rails 7.0

class ActiveRecord::RecordNotSaved

Parent:
ActiveRecord::ActiveRecordError

Raised by ActiveRecord::Base#save! and ActiveRecord::Base.create! methods when a record is invalid and cannot be saved.

Attributes

record[R]

Public Class Methods

new(message = nil, record = nil) Show source
# File activerecord/lib/active_record/errors.rb, line 120
def initialize(message = nil, record = nil)
  @record = record
  super(message)
end
Calls superclass method

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.