Class: Effective::PollsMailer

Inherits:
Object
  • Object
show all
Includes:
EffectiveEmailTemplatesMailer, EffectiveMailer
Defined in:
app/mailers/effective/polls_mailer.rb

Instance Method Summary collapse

Instance Method Details

#poll_before_poll_ends(poll_notification, user) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
# File 'app/mailers/effective/polls_mailer.rb', line 43

def poll_before_poll_ends(poll_notification, user)
  @assigns = effective_email_templates_assigns(poll_notification, user)

  mail(
    to: user.email,
    from: poll_notification.from,
    body: poll_notification.body,
    subject: poll_notification.subject,
    message_stream: 'broadcast-stream'
  )
end

#poll_reminder(poll_notification, user) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'app/mailers/effective/polls_mailer.rb', line 31

def poll_reminder(poll_notification, user)
  @assigns = effective_email_templates_assigns(poll_notification, user)

  mail(
    to: user.email,
    from: poll_notification.from,
    body: poll_notification.body,
    subject: poll_notification.subject,
    message_stream: 'broadcast-stream'
  )
end

#poll_upcoming_reminder(poll_notification, user) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'app/mailers/effective/polls_mailer.rb', line 7

def poll_upcoming_reminder(poll_notification, user)
  @assigns = effective_email_templates_assigns(poll_notification, user)

  mail(
    to: user.email,
    from: poll_notification.from,
    body: poll_notification.body,
    subject: poll_notification.subject,
    message_stream: 'broadcast-stream'
  )
end

#poll_when_poll_ends(poll_notification, user) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
# File 'app/mailers/effective/polls_mailer.rb', line 55

def poll_when_poll_ends(poll_notification, user)
  @assigns = effective_email_templates_assigns(poll_notification, user)

  mail(
    to: user.email,
    from: poll_notification.from,
    body: poll_notification.body,
    subject: poll_notification.subject,
    message_stream: 'broadcast-stream'
  )
end

#poll_when_poll_starts(poll_notification, user) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'app/mailers/effective/polls_mailer.rb', line 19

def poll_when_poll_starts(poll_notification, user)
  @assigns = effective_email_templates_assigns(poll_notification, user)

  mail(
    to: user.email,
    from: poll_notification.from,
    body: poll_notification.body,
    subject: poll_notification.subject,
    message_stream: 'broadcast-stream'
  )
end