Sha256: e7dbd7a79663b32b68c5527b3a4c64d3cb9f9684cc17fa78d6af82589bd936cf
Contents?: true
Size: 719 Bytes
Versions: 16
Compression:
Stored size: 719 Bytes
Contents
module ForemanOpenscap class Cve < ApplicationRecord has_many :host_cves has_many :hosts, :through => :host_cves has_many :oval_policies, :through => :host_cves scoped_search :relation => :host_cves, :on => :oval_policy_id, :rename => :oval_policy_id, :complete_value => false scope :of_oval_policy, ->(policy_id) { joins(:host_cves).where(:foreman_openscap_host_cves => { :oval_policy_id => policy_id }) } scope :of_host, ->(host_id) { joins(:host_cves).where(:foreman_openscap_host_cves => { :host_id => host_id }) } validates :ref_id, :ref_url, :definition_id, :presence => true class Jail < ::Safemode::Jail allow :ref_id, :ref_url end end end
Version data entries
16 entries across 16 versions & 1 rubygems