Class: ThinkFeelDoEngine::MessageNotifications

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/think_feel_do_engine/message_notifications.rb

Overview

Mailer for notifying of new application messages.

Instance Method Summary collapse

Instance Method Details

#new_for_coach(coach, group) ⇒ Object



4
5
6
7
8
# File 'app/mailers/think_feel_do_engine/message_notifications.rb', line 4

def new_for_coach(coach, group)
  @group = group
  mail to:      coach.email,
       subject: "New message"
end

#new_for_participant(participant) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'app/mailers/think_feel_do_engine/message_notifications.rb', line 10

def new_for_participant(participant)
  @context_name = participant
                  .current_group
                  .arm
                  .bit_core_tools
                  .find_by_type("Tools::Messages")
                  .title
  mail to:      participant.email,
       subject: "New message"
end