Sha256: 2f96771e591e0380a602140e13e162acddc49e225ef0566ad6aef93ee92fcba1
Contents?: true
Size: 770 Bytes
Versions: 15
Compression:
Stored size: 770 Bytes
Contents
module Katello class ContentViewDockerFilterRule < Katello::Model self.include_root_in_json = false belongs_to :filter, :class_name => "Katello::ContentViewDockerFilter", :inverse_of => :docker_rules, :foreign_key => :content_view_filter_id validates_lengths_from_database 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
15 entries across 15 versions & 1 rubygems