Sha256: 0ffdc74cba016c9205f6634dc553a27fb9e0179ea6d37b7341744e5e1fe7febe

Contents?: true

Size: 843 Bytes

Versions: 82

Compression:

Stored size: 843 Bytes

Contents

module Blazer
  class CheckMailer < ActionMailer::Base
    include ActionView::Helpers::TextHelper

    default from: Blazer.from_email if Blazer.from_email
    layout false

    def state_change(check, state, state_was, rows_count, error, columns, rows, column_types, check_type)
      @check = check
      @state = state
      @state_was = state_was
      @rows_count = rows_count
      @error = error
      @columns = columns
      @rows = rows
      @column_types = column_types
      @check_type = check_type
      mail to: check.emails, reply_to: check.emails, subject: "Check #{state.titleize}: #{check.query.name}"
    end

    def failing_checks(email, checks)
      @checks = checks
      # add reply_to for mailing lists
      mail to: email, reply_to: email, subject: "#{pluralize(checks.size, "Check")} Failing"
    end
  end
end

Version data entries

82 entries across 82 versions & 5 rubygems

Version Path
blazer-3.1.0 lib/blazer/check_mailer.rb
blazer-3.0.4 lib/blazer/check_mailer.rb
blazer_xlsx-3.0.8 lib/blazer/check_mailer.rb
sql-jarvis-2.1.10 app/mailers/blazer/check_mailer.rb
blazer_xlsx-3.0.7 lib/blazer/check_mailer.rb
blazer_xlsx-3.0.6 lib/blazer/check_mailer.rb
blazer_xlsx-3.0.5 lib/blazer/check_mailer.rb
blazer-3.0.3 lib/blazer/check_mailer.rb
blazer-3.0.2 lib/blazer/check_mailer.rb
finery-3.0.3 lib/blazer/check_mailer.rb
finery-3.0.2 lib/blazer/check_mailer.rb
blazer-3.0.1 lib/blazer/check_mailer.rb
finery-3.0.1 lib/blazer/check_mailer.rb
finery-3.0.0 lib/blazer/check_mailer.rb
blazer-3.0.0 lib/blazer/check_mailer.rb
sql-jarvis-2.1.9 app/mailers/blazer/check_mailer.rb
sql-jarvis-2.1.8 app/mailers/blazer/check_mailer.rb
sql-jarvis-2.1.7 app/mailers/blazer/check_mailer.rb
sql-jarvis-2.1.6 app/mailers/blazer/check_mailer.rb
blazer-2.6.5 lib/blazer/check_mailer.rb