now approvers for the category only get the emails
This commit is contained in:
parent
3f9446d545
commit
2f0f080687
|
@ -147,8 +147,9 @@ module Admin::AnnouncementsHelper
|
|||
users = users.concat(admins.to_a)
|
||||
end
|
||||
if @announcement_setting.email_to.include?("approvers")
|
||||
approvers = User.find(@announcement_setting.approvers) rescue []
|
||||
users = users.concat(approvers.to_a)
|
||||
approvers = User.find(@announcement_setting.approvers).to_a rescue []
|
||||
auths = Authorization.where(:category_id => announcement.category_id).collect{|a| a.user}
|
||||
users = users.concat(approvers & auths)
|
||||
end
|
||||
users.each do |user|
|
||||
email = user.member_profile.email
|
||||
|
|
Loading…
Reference in New Issue