Fewer mails sent to the submitter
This commit is contained in:
parent
0cc86601d0
commit
c27b292879
@ -7,14 +7,16 @@ class EventCallbacks
|
||||
end
|
||||
|
||||
def self.before_create(event)
|
||||
event.secret = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.moderator_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.submitter_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.secret ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.moderator_mail_id ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.submitter_mail_id ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
end
|
||||
|
||||
def self.after_create(event)
|
||||
EventMailer.create(event).deliver_now!
|
||||
ModerationMailer.create(event).deliver_now!
|
||||
if event.event.nil?
|
||||
EventMailer.create(event).deliver_now!
|
||||
ModerationMailer.create(event).deliver_now!
|
||||
end
|
||||
end
|
||||
|
||||
def self.before_update(event)
|
||||
|
Loading…
Reference in New Issue
Block a user