Sha256: adbbf8bc155d5ad91051ff6d1e9ebfa5636449337d5cb87cf6fb4a830b2d00d0

Contents?: true

Size: 629 Bytes

Versions: 67

Compression:

Stored size: 629 Bytes

Contents

module Katello
  module Pulp3
    class RepositoryReference < Katello::Model
      belongs_to :root_repository, :class_name => 'Katello::RootRepository'
      belongs_to :content_view, :class_name => 'Katello::ContentView'

      def self.default_cv_repository_hrefs(repositories, organizations)
        organizations = [organizations] if organizations.is_a?(::Organization)
        where(content_view_id: organizations.map(&:default_content_view).compact.pluck(:id)).
            where(root_repository_id: repositories.pluck(:root_id)).
              select(:repository_href).pluck(:repository_href)
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
katello-4.10.0 app/models/katello/pulp3/repository_reference.rb
katello-4.9.2 app/models/katello/pulp3/repository_reference.rb
katello-4.10.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.10.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.8.4 app/models/katello/pulp3/repository_reference.rb
katello-4.9.1 app/models/katello/pulp3/repository_reference.rb
katello-4.8.3 app/models/katello/pulp3/repository_reference.rb
katello-4.9.0 app/models/katello/pulp3/repository_reference.rb
katello-4.7.6 app/models/katello/pulp3/repository_reference.rb
katello-4.8.2 app/models/katello/pulp3/repository_reference.rb
katello-4.9.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.9.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.8.1 app/models/katello/pulp3/repository_reference.rb
katello-4.7.5 app/models/katello/pulp3/repository_reference.rb
katello-4.8.0 app/models/katello/pulp3/repository_reference.rb
katello-4.8.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.7.4 app/models/katello/pulp3/repository_reference.rb
katello-4.8.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.7.3 app/models/katello/pulp3/repository_reference.rb
katello-4.7.2 app/models/katello/pulp3/repository_reference.rb