Class: Renalware::Letters::Delivery::PracticeEmail
- Inherits:
-
Object
- Object
- Renalware::Letters::Delivery::PracticeEmail
- Defined in:
- app/models/renalware/letters/delivery/practice_email.rb
Overview
Utility class to help us resolve the correct email address when sending to the practice. If we allow_external_mail then we use the practice email, other wise we use the email of the last user to update the letter (useful for testing, ie you get the GP email if you approve the letter) or a system default for testing if the user has no email address.
Instance Method Summary collapse
Instance Method Details
#address ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/models/renalware/letters/delivery/practice_email.rb', line 19 def address if config.allow_external_mail practice&.email # nil is acceptable else config. end end |