2014-09-02 18:11:35 +03:00
# -*- coding: utf-8 -*-
class EventMailer < ActionMailer :: Base
def new_event_notification ( event )
@event = event
2014-09-06 17:17:09 +03:00
mail ( to : 'core@openfest.org' , subject : " Ново предложение за #{ @event . class . model_name . human . mb_chars . downcase . to_s } : #{ @event . title } " )
2014-09-02 18:11:35 +03:00
end
2014-10-12 14:54:06 +03:00
def acceptance_notification ( event )
@event = event
I18n . locale = @event . language
2014-10-13 12:24:25 +03:00
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 )
2014-10-12 14:54:06 +03:00
end
2014-10-17 21:05:26 +03:00
def rejection_notification ( event )
@event = event
I18n . locale = 'bg' # XXX Change this when per-user locale is introduced in the user
mail to : @event . user . email , from : 'program@openfest.org' , subject : " Предложението ви за #{ @event . conference . title } за #{ event . class . model_name . human . mb_chars . downcase . to_s } „ #{ @event . title } “ не е одобрено "
end
2014-09-02 18:11:35 +03:00
end