Exception: NaranyaEcm::Rest::AssociationTypeMismatch
- Inherits:
-
RestError
- Object
- StandardError
- RestError
- NaranyaEcm::Rest::AssociationTypeMismatch
- Defined in:
- lib/naranya_ecm/rest/errors.rb
Overview
Raised when an object assigned to an association has an incorrect type.
class Ticket < ActiveRecord::Base
has_many :patches
end
class Patch < ActiveRecord::Base
belongs_to :ticket
end
# Comments are not patches, this assignment raises AssociationTypeMismatch.
@ticket.patches << Comment.new(content: "Please attach tests to your patch.")
Instance Attribute Summary
Attributes inherited from RestError
Method Summary
Methods inherited from RestError
build_from_failed_response, #initialize, raise_by_failed_response
Constructor Details
This class inherits a constructor from NaranyaEcm::Rest::RestError