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)
|
users = users.concat(admins.to_a)
|
||||||
end
|
end
|
||||||
if @announcement_setting.email_to.include?("approvers")
|
if @announcement_setting.email_to.include?("approvers")
|
||||||
approvers = User.find(@announcement_setting.approvers) rescue []
|
approvers = User.find(@announcement_setting.approvers).to_a rescue []
|
||||||
users = users.concat(approvers.to_a)
|
auths = Authorization.where(:category_id => announcement.category_id).collect{|a| a.user}
|
||||||
|
users = users.concat(approvers & auths)
|
||||||
end
|
end
|
||||||
users.each do |user|
|
users.each do |user|
|
||||||
email = user.member_profile.email
|
email = user.member_profile.email
|
||||||
|
|
Loading…
Reference in New Issue