Sha256: d63dc2c4b8dd4da0bff440dac64962329848fe082a436ca871cad00e728c9f32

Contents?: true

Size: 593 Bytes

Versions: 5

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module UrlHelper
    # generated models get registered as curation concerns and need a
    # track_model_path to render Blacklight-related views
    (['FileSet', 'Collection', 'Hyrax::AdministrativeSet'] + Hyrax.config.registered_curation_concern_types).each do |concern|
      model = concern.safe_constantize
      model_name = model.respond_to?(:model_name) && model.model_name
      next unless model_name
      define_method("track_#{model_name.singular_route_key}_path") { |*args| main_app.track_solr_document_path(*args) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hyrax-3.6.0 app/helpers/hyrax/url_helper.rb
hyrax-3.5.0 app/helpers/hyrax/url_helper.rb
hyrax-3.4.2 app/helpers/hyrax/url_helper.rb
hyrax-3.4.1 app/helpers/hyrax/url_helper.rb
hyrax-3.4.0 app/helpers/hyrax/url_helper.rb