class method
self.new
Ruby on Rails 7.0.10
Since v3.1.12Signature
self.new(model = nil, description = nil)
No documentation comment.
Parameters
-
modelopt = nil -
descriptionopt = nil
Source
# File activerecord/lib/active_record/errors.rb, line 378
def initialize(model = nil, description = nil)
if model
message = "Unknown primary key for table #{model.table_name} in model #{model}."
message += "\n#{description}" if description
@model = model
super(message)
else
super("Unknown primary key.")
end
end
Defined in activerecord/lib/active_record/errors.rb line 378
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::UnknownPrimaryKey