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