Sha256: 53165de79b5f697cf91e9ec806dd1e00886c93c58219514f3b7c180db6388223
Contents?: true
Size: 831 Bytes
Versions: 14
Compression:
Stored size: 831 Bytes
Contents
module Katello class FileUnit < Katello::Model include Concerns::PulpDatabaseUnit self.table_name = 'katello_files' CONTENT_TYPE = 'file'.freeze has_many :repository_files, :class_name => "Katello::RepositoryFile", :dependent => :destroy, :inverse_of => :file, :foreign_key => :file_id has_many :repositories, :through => :repository_files, :class_name => "Katello::Repository" scoped_search :on => :name, :complete_value => true scoped_search :on => :path, :complete_value => true scoped_search :on => :checksum def self.default_sort order(:name) end def self.repository_association_class RepositoryFile end def self.unit_id_field 'file_id' end def self.total_for_repositories(repos) self.in_repositories(repos).count end end end
Version data entries
14 entries across 14 versions & 1 rubygems