Module: Models::SupportCaseLinkable
- Extended by:
- ActiveSupport::Concern
- Included in:
- CreditMemo, Rma
- Defined in:
- app/concerns/models/support_case_linkable.rb
Overview
ActiveSupport::Concern mixin: support case linkable.
Belongs to collapse
-
#support_case ⇒ SupportCase?
The support case linked to this record.
Instance Method Summary collapse
-
#support_case_ref ⇒ String?
Returns the case number of the linked support case.
-
#support_case_ref=(case_number) ⇒ SupportCase?
Links a support case by its case number.
Instance Attribute Details
#support_case ⇒ SupportCase?
Returns the support case linked to this record.
12 |
# File 'app/concerns/models/support_case_linkable.rb', line 12 belongs_to :support_case, optional: true |
Instance Method Details
#support_case_ref ⇒ String?
Returns the case number of the linked support case.
18 19 20 |
# File 'app/concerns/models/support_case_linkable.rb', line 18 def support_case_ref support_case&.case_number end |
#support_case_ref=(case_number) ⇒ SupportCase?
Links a support case by its case number.
26 27 28 |
# File 'app/concerns/models/support_case_linkable.rb', line 26 def support_case_ref=(case_number) self.support_case = SupportCase.where(case_number: case_number).first end |