Sha256: cc285630d91e8dfb8a7e59b54fa6324e3b3067960a3945b2eeb64352af54af22
Contents?: true
Size: 679 Bytes
Versions: 33
Compression:
Stored size: 679 Bytes
Contents
module Spotlight module SolrDocument ## # Mixin for SolrDocuments backed by exhibit-specific resources module UploadedResource extend ActiveSupport::Concern included do accepts_nested_attributes_for :uploaded_resource end def uploaded_resource @uploaded_resource ||= GlobalID::Locator.locate first(Spotlight::Engine.config.resource_global_id_field) rescue => e Rails.logger.info("Unable to locate uploaded resource: #{e}") nil end def to_openseadragon(*_args) [uploaded_resource.upload.iiif_tilesource] if uploaded_resource && uploaded_resource.upload end end end end
Version data entries
33 entries across 33 versions & 1 rubygems