Class: Georgia::Notifier
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Georgia::Notifier
- Defined in:
- app/mailers/georgia/notifier.rb
Instance Method Summary collapse
Instance Method Details
#notify_admins(message, url) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/mailers/georgia/notifier.rb', line 4 def notify_admins(, url) @message = @url = url emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email) unless emails_to.empty? mail( from: "[email protected]", to: emails_to, subject: @message ) end end |
#notify_editors(message, url) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/mailers/georgia/notifier.rb', line 17 def notify_editors(, url) @message = @url = url emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email) unless emails_to.empty? mail( from: "[email protected]", to: emails_to, subject: @message ) end end |