Class: IiifPrint::IngestFileRelation

Inherits:
ApplicationRecord show all
Defined in:
app/models/iiif_print/ingest_file_relation.rb

Class Method Summary collapse

Class Method Details

.derivatives_for_file(path) ⇒ Array<String>

Query by file path for all derivatives, as de-duplicated array of

derivative paths.

Parameters:

  • path (String)

    Path to primary file

Returns:

  • (Array<String>)

    de-duplicated array of derivative paths.



10
11
12
# File 'app/models/iiif_print/ingest_file_relation.rb', line 10

def self.derivatives_for_file(path)
  where(file_path: path).pluck(:derivative_path).uniq
end