Class: Spree::ClaimReason
- Inherits:
-
Object
- Object
- Spree::ClaimReason
- Defined in:
- app/models/spree/claim_reason.rb
Overview
Why a customer raised a claim — "arrived damaged", "never arrived", "wrong item sent". A different vocabulary from ReturnReason: a claim is about something the merchant got wrong, not about a customer changing their mind.
Instance Method Summary collapse
-
#can_be_deleted? ⇒ Boolean
Mirrors what
dependent: :restrict_with_errorenforces, so the dashboard can hide the delete control rather than offer one the model will refuse.
Methods included from Metadata
#private_metadata, #private_metadata=
Instance Method Details
#can_be_deleted? ⇒ Boolean
Mirrors what dependent: :restrict_with_error enforces, so the dashboard
can hide the delete control rather than offer one the model will refuse.
20 21 22 |
# File 'app/models/spree/claim_reason.rb', line 20 def can_be_deleted? !claims.exists? end |