Sha256: ce065bc1b3b86d4daed247d1a52e3688c9e9d39cad97445542fa029cf9195158

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

# Provide access to the authority_status database table which tracks a summary of status data over time.
module QaServer
  class AuthorityStatus < ActiveRecord::Base
    self.table_name = 'authority_status'
    has_many :authority_status_failure, foreign_key: :authority_status_id

    # Get the latest saved status.
    def self.latest
      last
    end

    # Get the latest set of failures, if any.
    def self.latest_failures
      return nil if latest.blank?
      AuthorityStatusFailure.where(authority_status_id: latest.id)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qa_server-0.1.99 app/models/qa_server/authority_status.rb