Class: WelcomeMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- WelcomeMailer
- Defined in:
- app/mailers/welcome_mailer.rb
Instance Method Summary collapse
-
#welcome(relationship_id:, relationship_type:) ⇒ Object
relationship: school_leadership or class_membership.
Instance Method Details
#welcome(relationship_id:, relationship_type:) ⇒ Object
relationship: school_leadership or class_membership
Note that this is intended for SMS only.
14 15 16 17 18 19 20 21 |
# File 'app/mailers/welcome_mailer.rb', line 14 def welcome(relationship_id:, relationship_type:) relationship = relationship_type.constantize.find_by(id: relationship_id) abort_mail unless recipient_credential.phone? && relationship.present? @context = relationship.context.decorate mail end |