Sha256: 75cdc96ef7c5b605287f23a77679e23e98f6a762a6921c984d2630159eeec6fe

Contents?: true

Size: 756 Bytes

Versions: 101

Compression:

Stored size: 756 Bytes

Contents

module Katello
  class ContentViewDockerFilterRule < Katello::Model
    include ::Katello::Concerns::ContentViewFilterRuleCommon
    belongs_to :filter,
               :class_name => "Katello::ContentViewDockerFilter",
               :inverse_of => :docker_rules,
               :foreign_key => :content_view_filter_id

    validates :name, :presence => true
    validate :ensure_unique_attributes

    def ensure_unique_attributes
      other = self.class.where(:name => self.name,
                               :content_view_filter_id => self.content_view_filter_id)
      other = other.where.not(:id => self.id) if self.id
      if other.exists?
        errors.add(:base, "This docker manifest filter rule already exists.")
      end
    end
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
katello-3.18.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.18.0 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.2 app/models/katello/content_view_docker_filter_rule.rb
katello-3.18.0.rc2.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.18.0.rc2 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.0 app/models/katello/content_view_docker_filter_rule.rb
katello-3.18.0.rc1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.0.rc2.2 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.0.rc2.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.1.2 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.1.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.0.rc2 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.17.0.rc1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.0 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.0.rc5.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.0.rc5 app/models/katello/content_view_docker_filter_rule.rb
katello-3.16.0.rc4.1 app/models/katello/content_view_docker_filter_rule.rb
katello-3.15.3.1 app/models/katello/content_view_docker_filter_rule.rb