Class: Silas::ChannelMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Silas::ChannelMailer
- Defined in:
- app/mailers/silas/channel_mailer.rb
Overview
Outbound email for the email channel: the agent's answer, and an approval request rendering two signed one-click links.
Instance Method Summary collapse
Instance Method Details
#answer(to:, subject:, text:) ⇒ Object
5 6 7 8 |
# File 'app/mailers/silas/channel_mailer.rb', line 5 def answer(to:, subject:, text:) @text = text mail(to: to, subject: subject) { |f| f.text { render plain: text } } end |
#approval(to:, subject:, invocation:) ⇒ Object
10 11 12 13 14 15 |
# File 'app/mailers/silas/channel_mailer.rb', line 10 def approval(to:, subject:, invocation:) @invocation = invocation @approve_token = Silas::Channel.token_for(invocation, "approve") @decline_token = Silas::Channel.token_for(invocation, "decline") mail(to: to, subject: subject) end |