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