edge badge

Raised when a primary key is needed, but not specified in the schema or model.

Methods
N
Attributes
[R] model
Class Public methods
new(model, description = nil)
# File activerecord/lib/active_record/errors.rb, line 221
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