Module: Models::RmaTransmittable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/concerns/models/rma_transmittable.rb
Overview
Transmission-target helpers for Rma: normalizes the stored
transmission_email / transmission_fax lists and merges them with the
customer's own contact points to build the selectable target lists.
Instance Method Summary collapse
-
#rma_available_email_addresses ⇒ Array<String>
Union of the RMA's stored transmission emails and the customer's email contact points.
-
#rma_available_fax_numbers ⇒ Array<String>
Union of the RMA's stored transmission fax numbers and the customer's fax contact points.
Instance Method Details
#rma_available_email_addresses ⇒ Array<String>
Union of the RMA's stored transmission emails and the customer's email
contact points.
21 22 23 24 |
# File 'app/concerns/models/rma_transmittable.rb', line 21 def rma_available_email_addresses customer_emails = customer.nil? ? [] : customer.contacts_and_self_contact_points_by_category('email').pluck(:detail) ((transmission_email || []) | customer_emails) end |
#rma_available_fax_numbers ⇒ Array<String>
Union of the RMA's stored transmission fax numbers and the customer's fax
contact points.
30 31 32 33 |
# File 'app/concerns/models/rma_transmittable.rb', line 30 def rma_available_fax_numbers customer_faxes = customer.nil? ? [] : customer.contacts_and_self_contact_points_by_category('fax').pluck(:detail) ((transmission_fax || []) | customer_faxes) end |