123456789_123456789_123456789_123456789_123456789_

Exception: ActiveRecord::RecordNotFound

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 when Active Record cannot find a record by given id or set of ids.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(message = nil, model = nil, primary_key = nil, id = nil) ⇒ RecordNotFound

[ GitHub ]

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

def initialize(message = nil, model = nil, primary_key = nil, id = nil)
  @primary_key = primary_key
  @model = model
  @id = id

  super(message)
end

Instance Attribute Details

#id (readonly)

[ GitHub ]

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

attr_reader :model, :primary_key, :id

#model (readonly)

[ GitHub ]

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

attr_reader :model, :primary_key, :id

#primary_key (readonly)

[ GitHub ]

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

attr_reader :model, :primary_key, :id