1class SponsorMailer < ApplicationMailer
  • Complexity 1 » saikuro
2  def sponsor_signed_email_below_threshold(sponsor)
 
3    @petition, @sponsor = sponsor.petition, sponsor
 
4    @sponsor_count = @petition.sponsors.validated.count
 
5
 
6    mail(
 
7      subject: "#{@sponsor.name} supported your petition",
 
8      to: @petition.creator.email
 
 9    )
 
10  end
 
  • Complexity 1 » saikuro
12  def sponsor_signed_email_on_threshold(sponsor)
 
13    @petition, @sponsor = sponsor.petition, sponsor
 
14    @sponsor_count = @petition.sponsors.validated.count
 
 
16    mail(
 
17      subject: "Were checking your petition",
 
18      to: @petition.creator.email
 
19    )
 
20  end
 
  • Complexity 1 » saikuro
22  def petition_and_email_confirmation_for_sponsor(sponsor)
 
23    @petition, @sponsor = sponsor.petition, sponsor
 
 
25    mail(
 
26      subject: "Please confirm your email address",
 
27      to: @sponsor.email
 
28    )
 
29  end
 
30end