Class: Effective::MentorshipsMailer

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

Instance Method Summary collapse

Instance Method Details

#mentorship_group_created_to_mentee(resource, opts = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'app/mailers/effective/mentorships_mailer.rb', line 15

def mentorship_group_created_to_mentee(resource, opts = {})
  raise('expected an Effective::MentorshipGroupUser') unless resource.kind_of?(Effective::MentorshipGroupUser)
  raise('expected a mentee') unless resource.mentee?

  @assigns = assigns_for(resource).merge(url: effective_mentorships.mentorship_group_url(resource))
  mail(to: resource.user.email, **headers_for(resource, opts))
end

#mentorship_group_created_to_mentor(resource, opts = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'app/mailers/effective/mentorships_mailer.rb', line 7

def mentorship_group_created_to_mentor(resource, opts = {})
  raise('expected an Effective::MentorshipGroupUser') unless resource.kind_of?(Effective::MentorshipGroupUser)
  raise('expected a mentor') unless resource.mentor?

  @assigns = assigns_for(resource).merge(url: effective_mentorships.mentorship_group_url(resource))
  mail(to: resource.user.email, **headers_for(resource, opts))
end