Sha256: d2429ade2ad2389b195c7617b163e7449ee7b10471cae14acb9f13d791db5d25
Contents?: true
Size: 757 Bytes
Versions: 10
Compression:
Stored size: 757 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
10 entries across 10 versions & 1 rubygems