Merge pull request #836 from davidsf/fix_email_send
Fix send emails because missing event program relation.
This commit is contained in:
commit
3ad009658d
2 changed files with 6 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ class Mailbot < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def acceptance_mail(event)
|
def acceptance_mail(event)
|
||||||
conference = event.conference
|
conference = event.program.conference
|
||||||
person = event.submitter
|
person = event.submitter
|
||||||
build_email(conference,
|
build_email(conference,
|
||||||
person.email,
|
person.email,
|
||||||
|
|
@ -18,7 +18,7 @@ class Mailbot < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def rejection_mail(event)
|
def rejection_mail(event)
|
||||||
conference = event.conference
|
conference = event.program.conference
|
||||||
person = event.submitter
|
person = event.submitter
|
||||||
build_email(conference,
|
build_email(conference,
|
||||||
person.email,
|
person.email,
|
||||||
|
|
@ -27,7 +27,7 @@ class Mailbot < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_reminder_mail(event)
|
def confirm_reminder_mail(event)
|
||||||
conference = event.conference
|
conference = event.program.conference
|
||||||
person = event.submitter
|
person = event.submitter
|
||||||
build_email(conference,
|
build_email(conference,
|
||||||
person.email,
|
person.email,
|
||||||
|
|
@ -83,7 +83,7 @@ class Mailbot < ActionMailer::Base
|
||||||
def send_notification_email_for_comment(comment)
|
def send_notification_email_for_comment(comment)
|
||||||
@comment = comment
|
@comment = comment
|
||||||
@event = @comment.commentable
|
@event = @comment.commentable
|
||||||
@conference = @event.conference
|
@conference = @event.program.conference
|
||||||
recipients = User.comment_notifiable(@conference) # with scope
|
recipients = User.comment_notifiable(@conference) # with scope
|
||||||
recipients.each do |user|
|
recipients.each do |user|
|
||||||
@user = user
|
@user = user
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@ class EmailSettings < ActiveRecord::Base
|
||||||
|
|
||||||
if event
|
if event
|
||||||
h['eventtitle'] = event.title
|
h['eventtitle'] = event.title
|
||||||
h['proposalslink'] = Rails.application.routes.url_helpers.conference_proposal_index_url(
|
h['proposalslink'] = Rails.application.routes.url_helpers.conference_program_proposal_index_url(
|
||||||
conference.short_title, host: CONFIG['url_for_emails'])
|
conference.short_title, host: CONFIG['url_for_emails'])
|
||||||
end
|
end
|
||||||
h
|
h
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_event_mail(event, event_template)
|
def generate_event_mail(event, event_template)
|
||||||
values = get_values(event.conference, event.submitter, event)
|
values = get_values(event.program.conference, event.submitter, event)
|
||||||
parse_template(event_template, values)
|
parse_template(event_template, values)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue