saucy/app/mailers/notification_mailer.rb
Hugo Peixoto 9058ed98f7 Adds payment page
Instead of sending all the payment details by email, we're now sending
only a link to a page on this platform. This is to help reduce questions
of whether the emails are from scammers or real.
2023-07-12 19:13:08 +01:00

39 lines
780 B
Ruby

class NotificationMailer < ApplicationMailer
before_action :set_notification
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.notification_mailer.expiration_in_60d.subject
#
def expiration_in_60d
mail to: @notification.member.email
end
def expiration_in_30d
mail to: @notification.member.email
end
def expired
mail to: @notification.member.email
end
def expired_30d_ago
mail to: @notification.member.email
end
def expired_60d_ago
mail to: @notification.member.email
end
def cancelled
mail to: @notification.member.email
end
private
def set_notification
@notification = params[:notification]
@payment = @notification.member.create_payment
end
end