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.15.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.15.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.14.1 app/models/katello/pulp3/repository_reference.rb
katello-4.14.0 app/models/katello/pulp3/repository_reference.rb
katello-4.14.0.rc3 app/models/katello/pulp3/repository_reference.rb
katello-4.14.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.14.0.rc1.1 app/models/katello/pulp3/repository_reference.rb
katello-4.14.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.13.1 app/models/katello/pulp3/repository_reference.rb
katello-4.13.0 app/models/katello/pulp3/repository_reference.rb
katello-4.12.1 app/models/katello/pulp3/repository_reference.rb
katello-4.13.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.12.0 app/models/katello/pulp3/repository_reference.rb
katello-4.12.0.rc3 app/models/katello/pulp3/repository_reference.rb
katello-4.12.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.12.0.rc1 app/models/katello/pulp3/repository_reference.rb
katello-4.11.1 app/models/katello/pulp3/repository_reference.rb
katello-4.11.0 app/models/katello/pulp3/repository_reference.rb
katello-4.11.0.rc2 app/models/katello/pulp3/repository_reference.rb
katello-4.11.0.rc1 app/models/katello/pulp3/repository_reference.rb