Class: ServicePacksMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- ServicePacksMailer
- Defined in:
- app/mailers/service_packs_mailer.rb
Instance Method Summary collapse
- #expired_email(user, service_pack) ⇒ Object
- #notify_under_threshold1(user, service_pack) ⇒ Object
- #notify_under_threshold2(user, service_pack) ⇒ Object
- #used_up_email(user, service_pack) ⇒ Object
Instance Method Details
#expired_email(user, service_pack) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'app/mailers/service_packs_mailer.rb', line 2 def expired_email(user, service_pack) @user = user @sp = service_pack # binding.pry mail to: @user.mail, subject: "The service pack #{@sp.name} has expired" do |format| format.text format.html end end |
#notify_under_threshold1(user, service_pack) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/mailers/service_packs_mailer.rb', line 13 def notify_under_threshold1(user, service_pack) @user = user @sp = service_pack # binding.pry mail to: @user.mail, subject: "The service pack #{@sp.name} is running out" do |format| format.text format.html end end |
#notify_under_threshold2(user, service_pack) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/mailers/service_packs_mailer.rb', line 23 def notify_under_threshold2(user, service_pack) @user = user @sp = service_pack # binding.pry mail to: @user.mail, subject: "The service pack #{@sp.name} is running out" do |format| format.text format.html end end |
#used_up_email(user, service_pack) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'app/mailers/service_packs_mailer.rb', line 33 def used_up_email(user, service_pack) @user = user @sp = service_pack mail to: @user.mail, subject: "The service pack #{@sp.name} ran out of units" do |format| format.text format.html end end |