Sha256: 824727609b40371a8bdc35508dc441e04a2217e2ef7986b2490fb2fd1704de0e
Contents?: true
Size: 545 Bytes
Versions: 62
Compression:
Stored size: 545 Bytes
Contents
module CurationConcerns class ParentService # @param [String] the id of a child FileSet # @return [ActiveFedora::Base] the parent object def self.parent_for(id) ids = ordered_by_ids(id) ActiveFedora::Base.find(ordered_by_ids(id).first) if ids.present? end def self.ordered_by_ids(id) if id.present? ActiveFedora::SolrService.query("{!join from=proxy_in_ssi to=id}ordered_targets_ssim:#{id}") .map { |x| x["id"] } else [] end end end end
Version data entries
62 entries across 62 versions & 1 rubygems