Sha256: 3c56c4fd297d278b23daaf5e2a36ebea0d884b3ed89dc79d35f48297f406c7cb
Contents?: true
Size: 1.02 KB
Versions: 22
Compression:
Stored size: 1.02 KB
Contents
module Katello class ContentViewComponent < Katello::Model self.include_root_in_json = false belongs_to :content_view, :class_name => "Katello::ContentView", :inverse_of => :content_view_components belongs_to :content_view_version, :class_name => "Katello::ContentViewVersion", :inverse_of => :content_view_components validates_lengths_from_database validates :content_view_version_id, :uniqueness => {:scope => :content_view_id} validate :content_view_types private def content_view_types unless content_view.composite? errors.add(:base, _("Cannot add component versions to a non-composite content view")) end if content_view_version.content_view.composite? errors.add(:base, _("Cannot add composite versions to a composite content view")) end if content_view_version.default? errors.add(:base, _("Cannot add default content view to composite content view")) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems