Method: ActiveRecord::UnknownPrimaryKey#initialize
- Defined in:
- activerecord/lib/active_record/errors.rb
#initialize(model = nil, description = nil) ⇒ UnknownPrimaryKey
Returns a new instance of UnknownPrimaryKey.
462 463 464 465 466 467 468 469 470 471 |
# File 'activerecord/lib/active_record/errors.rb', line 462 def initialize(model = nil, description = nil) if model = "Unknown primary key for table #{model.table_name} in model #{model}." += "\n#{description}" if description @model = model super() else super("Unknown primary key.") end end |