class ActiveFedora::AssociationTypeMismatch
@ticket.patches << Comment.new(content: “Please attach tests to your patch.”)
# Comments are not patches, this assignment raises AssociationTypeMismatch.
end
belongs_to :ticket, predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isComponentOf
class Patch < ActiveFedora::Base
end
has_many :patches
class Ticket < ActiveFedora::Base
Raised when an object assigned to an association has an incorrect type.