Exception: ActiveRecord::RecordNotFound
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::RecordNotFound
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb
Overview
Raised when Active Record cannot find a record by given id or set of ids.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#primary_key ⇒ Object
readonly
Returns the value of attribute primary_key.
Instance Method Summary collapse
-
#initialize(message = nil, model = nil, primary_key = nil, id = nil) ⇒ RecordNotFound
constructor
A new instance of RecordNotFound.
Constructor Details
#initialize(message = nil, model = nil, primary_key = nil, id = nil) ⇒ RecordNotFound
Returns a new instance of RecordNotFound.
105 106 107 108 109 110 111 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 105 def initialize( = nil, model = nil, primary_key = nil, id = nil) @primary_key = primary_key @model = model @id = id super() end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
103 104 105 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 103 def id @id end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
103 104 105 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 103 def model @model end |
#primary_key ⇒ Object (readonly)
Returns the value of attribute primary_key.
103 104 105 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 103 def primary_key @primary_key end |