Sha256: 40ec26b5a46f772bdf7d392b5ac83534a80836c00e89442d08f3056da9082c50

Contents?: true

Size: 566 Bytes

Versions: 10

Compression:

Stored size: 566 Bytes

Contents

# frozen_string_literal: true
# Provide access to the authority_status database table which tracks a summary of status data over time.
module QaServer
  class AuthorityStatus < ApplicationRecord
    self.table_name = 'authority_status'
    has_many :authority_status_failure, dependent: :destroy

    # 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

10 entries across 10 versions & 1 rubygems

Version Path
qa_server-8.0.1 app/models/qa_server/authority_status.rb
qa_server-7.9.2 app/models/qa_server/authority_status.rb
qa_server-7.9.1 app/models/qa_server/authority_status.rb
qa_server-7.9.0 app/models/qa_server/authority_status.rb
qa_server-7.8.0 app/models/qa_server/authority_status.rb
qa_server-7.7.1 app/models/qa_server/authority_status.rb
qa_server-7.7.0 app/models/qa_server/authority_status.rb
qa_server-7.6.0 app/models/qa_server/authority_status.rb
qa_server-7.5.1 app/models/qa_server/authority_status.rb
qa_server-7.5.0 app/models/qa_server/authority_status.rb