Sha256: 377c35160610083756a6dcc494cfd4ee9725a68d4e81fe8da3cd8db4cb7cd106

Contents?: true

Size: 791 Bytes

Versions: 1

Compression:

Stored size: 791 Bytes

Contents

module Georgia
  class Notifier < ActionMailer::Base

    def notify_admins(message, url)
      @message = message
      @url = url
      emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email)
      unless emails_to.empty?
        mail(
          from: "notify@georgiacms.org",
          to: emails_to,
          subject: @message
          )
      end
    end

    def notify_editors(message, url)
      @message = message
      @url = url
      emails_to = Georgia::User.where(roles: ['admin', 'editor']).where(receives_notifications: true).pluck(:email)
      unless emails_to.empty?
        mail(
          from: "notify@georgiacms.org",
          to: emails_to,
          subject: @message
          )
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia-0.8.0 app/mailers/georgia/notifier.rb