4
5
6
7
8
9
10
11
12
13
|
# File 'app/mailers/flag_mailer.rb', line 4
def flag_escalated
@flag = params[:flag]
emails = User.joins(:community_user).where(is_global_admin: true)
.or(User.joins(:community_user)
.where(community_users: { is_admin: true, community_id: @flag. }))
.select(:email).map(&:email)
from = "#{SiteSetting['NoReplySenderName']} <#{SiteSetting['NoReplySenderEmail']}>"
to = SiteSetting['NoReplySenderEmail']
mail from: from, to: to, bcc: emails, subject: "New flag escalation on #{@flag..name}"
end
|