saucy/app/mailers/notification_mailer.rb

39 lines
785 B
Ruby
Raw Normal View History

2022-06-25 12:48:46 +00:00
class NotificationMailer < ApplicationMailer
2022-07-16 10:27:43 +00:00
before_action :set_notification
2022-06-25 12:48:46 +00:00
# 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
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
2022-06-25 12:48:46 +00:00
end
def expiration_in_30d
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
2022-06-25 12:48:46 +00:00
end
def expired
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
2022-06-25 12:48:46 +00:00
end
def expired_30d_ago
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
2022-06-25 12:48:46 +00:00
end
def expired_60d_ago
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
2022-06-25 12:48:46 +00:00
end
def cancelled
2022-07-16 10:27:43 +00:00
mail to: @notification.member.email
end
2022-06-25 12:48:46 +00:00
2022-07-16 10:27:43 +00:00
private
def set_notification
@notification = params[:notification]
@link = @notification.member.regular_ifthenpay_link
2022-06-25 12:48:46 +00:00
end
end