app/mailers/georgia/notifier.rb in georgia-0.7.8 vs app/mailers/georgia/notifier.rb in georgia-0.8.0
- old
+ new
@@ -2,26 +2,26 @@
class Notifier < ActionMailer::Base
def notify_admins(message, url)
@message = message
@url = url
- emails_to = Georgia::User.admins.map(&:email)
+ emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email)
unless emails_to.empty?
mail(
- from: "georgia@motioneleven.com",
+ from: "notify@georgiacms.org",
to: emails_to,
subject: @message
)
end
end
def notify_editors(message, url)
@message = message
@url = url
- emails_to = Georgia::User.editors.map(&:email)
+ emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email)
unless emails_to.empty?
mail(
- from: "georgia@motioneleven.com",
+ from: "notify@georgiacms.org",
to: emails_to,
subject: @message
)
end
end