method

new

rails latest stable - Class: ActiveRecord::NoDatabaseError::UnknownPrimaryKey

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

new(model = nil, description = nil)
public

No documentation available.

# 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