Exception: ActiveRecord::AssociationTypeMismatch
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::AssociationTypeMismatch
- Defined in:
- lib/active_record/base.rb
Overview
Raised when object assigned to association is of incorrect type.
Example:
class Ticket < ActiveRecord::Base
has_many :patches
end
class Patch < ActiveRecord::Base
belongs_to :ticket
end
and somewhere in the code: