Sha256: a8f88b14a016bf4947a33bbef5ff3eb49e46d1abba5a0f755e45b57455da7f07

Contents?: true

Size: 858 Bytes

Versions: 13

Compression:

Stored size: 858 Bytes

Contents

# frozen_string_literal: true
module ThinkFeelDoEngine
  # Mailer for notifying of new application messages.
  class MessageNotifications < ActionMailer::Base
    def new_for_coach(coach, group)
      application_name = I18n.t(:application_name, default: "ThinkFeelDo")
      @group = group
      mail to:      coach.email,
           subject: "#{application_name}: You have a new message"
    end

    def new_for_participant(participant)
      application_name = I18n.t(:application_name, default: "ThinkFeelDo")
      @context_name = participant
                      .current_group
                      .arm
                      .bit_core_tools
                      .find_by_type("Tools::Messages")
                      .title
      mail to:      participant.email,
           subject: "#{application_name}: You have a new message"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.9 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.8 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.7 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.6 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.5 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.4 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.2 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.1 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.22.0 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.21.2 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.21.1 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.21.0 app/mailers/think_feel_do_engine/message_notifications.rb
think_feel_do_engine-3.20.1 app/mailers/think_feel_do_engine/message_notifications.rb