Add Event#send_acceptance_second_notification
This commit is contained in:
parent
21f854ea56
commit
26e523dc2f
|
@ -11,6 +11,12 @@ class EventMailer < ActionMailer::Base
|
|||
mail to: @event.user.email, from: 'program@openfest.org', subject: I18n.t('event_mailer.acceptance_notification.subject', conference: @event.conference.title, submission_type: @event.class.model_name.human.mb_chars.downcase.to_s, title: @event.title)
|
||||
end
|
||||
|
||||
def acceptance_second_notification(event)
|
||||
@event = event
|
||||
I18n.locale = @event.language
|
||||
mail to: @event.user.email, from: 'program@openfest.org', subject: I18n.t('event_mailer.acceptance_notification.subject', conference: @event.conference.title, submission_type: @event.class.model_name.human.mb_chars.downcase.to_s, title: @event.title)
|
||||
end
|
||||
|
||||
def rejection_notification(event)
|
||||
@event = event
|
||||
I18n.locale = 'bg' # XXX Change this when per-user locale is introduced in the user
|
||||
|
|
|
@ -25,6 +25,11 @@ class Event < ActiveRecord::Base
|
|||
touch :acceptance_notification_sent_at
|
||||
end
|
||||
|
||||
def send_acceptance_second_notification!
|
||||
EventMailer.acceptance_second_notification(self).deliver
|
||||
touch :acceptance_notification_sent_at
|
||||
end
|
||||
|
||||
def send_rejection_notification!
|
||||
EventMailer.rejection_notification(self).deliver
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue