Sha256: e225baf1068d887b64197b168964b40b4af9f09d20b9398df065cea1c8bc341d
Contents?: true
Size: 939 Bytes
Versions: 239
Compression:
Stored size: 939 Bytes
Contents
module Katello class ContentViewVersionComponent < Katello::Model belongs_to :composite_version, :class_name => "Katello::ContentViewVersion", :inverse_of => :content_view_version_components belongs_to :component_version, :class_name => "Katello::ContentViewVersion", :inverse_of => :content_view_version_composites validates_lengths_from_database validate :content_view_types private def content_view_types unless composite_version.content_view.composite? errors.add(:base, _("Cannot add component versions to a non-composite content view")) end if component_version.content_view.composite? errors.add(:base, _("Cannot add composite versions to another composite content view")) end if composite_version.default? || component_version.default? errors.add(:base, _("Cannot add default content view to composite content view")) end end end end
Version data entries
239 entries across 239 versions & 1 rubygems