From c9951b451a80396acebc2bcd0be62a8364cc90d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sede=C3=B1o?= Date: Sat, 5 Mar 2016 23:48:43 +0100 Subject: [PATCH] Fix send emails because missing event program relation. fix #835 --- app/mailers/mailbot.rb | 8 ++++---- app/models/email_settings.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/mailers/mailbot.rb b/app/mailers/mailbot.rb index 5c378e09..1c772eff 100644 --- a/app/mailers/mailbot.rb +++ b/app/mailers/mailbot.rb @@ -9,7 +9,7 @@ class Mailbot < ActionMailer::Base end def acceptance_mail(event) - conference = event.conference + conference = event.program.conference person = event.submitter build_email(conference, person.email, @@ -18,7 +18,7 @@ class Mailbot < ActionMailer::Base end def rejection_mail(event) - conference = event.conference + conference = event.program.conference person = event.submitter build_email(conference, person.email, @@ -27,7 +27,7 @@ class Mailbot < ActionMailer::Base end def confirm_reminder_mail(event) - conference = event.conference + conference = event.program.conference person = event.submitter build_email(conference, person.email, @@ -83,7 +83,7 @@ class Mailbot < ActionMailer::Base def send_notification_email_for_comment(comment) @comment = comment @event = @comment.commentable - @conference = @event.conference + @conference = @event.program.conference recipients = User.comment_notifiable(@conference) # with scope recipients.each do |user| @user = user diff --git a/app/models/email_settings.rb b/app/models/email_settings.rb index be1fc1cb..da54d0e8 100644 --- a/app/models/email_settings.rb +++ b/app/models/email_settings.rb @@ -38,7 +38,7 @@ class EmailSettings < ActiveRecord::Base if event 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']) end h