|
|
|
@ -85,8 +85,18 @@ class MeetingContentsController < ApplicationController |
|
|
|
|
unless @content.new_record? |
|
|
|
|
recipients = @content.meeting.participants.collect(&:mail).reject { |r| r == @content.meeting.author.mail } |
|
|
|
|
recipients << @content.meeting.author.mail unless @content.meeting.author.preference[:no_self_notified] |
|
|
|
|
recipients_with_errors = [] |
|
|
|
|
recipients.each do |recipient| |
|
|
|
|
MeetingMailer.content_for_review(@content, @content_type, recipient).deliver |
|
|
|
|
begin |
|
|
|
|
MeetingMailer.content_for_review(@content, @content_type, recipient).deliver |
|
|
|
|
rescue |
|
|
|
|
recipients_with_errors << recipient |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if recipients_with_errors == [] |
|
|
|
|
flash[:notice] = l(:notice_successful_notification) |
|
|
|
|
else |
|
|
|
|
flash[:notice] = l(:notice_notification_with_errors) + recipients_with_errors.join(", ") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
redirect_back_or_default controller: '/meetings', action: 'show', id: @meeting |
|
|
|
|