Sha256: 45eceed0773a8260267847012aedbbb23bf8e5b18346be3b2cb0e6365190a40c
Contents?: true
Size: 491 Bytes
Versions: 3
Compression:
Stored size: 491 Bytes
Contents
module NewspaperWorks class IngestFileRelation < ApplicationRecord validates :file_path, presence: true validates :derivative_path, presence: true # Query by file path for all derivatives, as de-duplicated array of # derivative paths. # @param path [String] Path to primary file # @return [Array<String>] de-duplicated array of derivative paths. def self.derivatives_for_file(path) where(file_path: path).pluck(:derivative_path).uniq end end end
Version data entries
3 entries across 3 versions & 1 rubygems