Class: Katello::ContentViewErratumFilterRule
- Defined in:
- app/models/katello/content_view_erratum_filter_rule.rb
Constant Summary collapse
- ISSUED =
"issued".freeze
- UPDATED =
"updated".freeze
- DATE_TYPES =
[ISSUED, UPDATED].freeze
Instance Method Summary collapse
Methods inherited from Model
Instance Method Details
#default_types ⇒ Object
37 38 39 40 41 |
# File 'app/models/katello/content_view_erratum_filter_rule.rb', line 37 def default_types if errata_id.nil? && types.blank? self.types = ContentViewErratumFilter::ERRATA_TYPES.keys end end |
#filter_has_date_or_type_rule? ⇒ Boolean
29 30 31 |
# File 'app/models/katello/content_view_erratum_filter_rule.rb', line 29 def filter_has_date_or_type_rule? filter.erratum_rules.any? { |rule| rule.start_date || rule.end_date || !rule.types.blank? } end |
#pulp_date_type ⇒ Object
33 34 35 |
# File 'app/models/katello/content_view_erratum_filter_rule.rb', line 33 def pulp_date_type self.date_type == ISSUED ? "issued" : "updated" end |