Sha256: 1c6368e9da67b747b2f9a03dec543c4eeb0553a617360a3e88440202dae9b784
Contents?: true
Size: 796 Bytes
Versions: 2
Compression:
Stored size: 796 Bytes
Contents
module Katello class ContentViewErratumFilterRule < Katello::Model self.include_root_in_json = false include Glue::ElasticSearch::ContentViewErratumFilterRule if SETTINGS[:katello][:use_elasticsearch] belongs_to :filter, :class_name => "Katello::ContentViewErratumFilter", :inverse_of => :erratum_rules, :foreign_key => :content_view_filter_id serialize :types, Array validates_lengths_from_database validates :errata_id, :uniqueness => { :scope => :content_view_filter_id }, :allow_blank => true validates_with Validators::ContentViewErratumFilterRuleValidator def filter_has_date_or_type_rule? filter.erratum_rules.any? { |rule| rule.start_date || rule.end_date || !rule.types.blank? } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
katello-2.4.0.rc2 | app/models/katello/content_view_erratum_filter_rule.rb |
katello-2.4.0.rc1 | app/models/katello/content_view_erratum_filter_rule.rb |