Sha256: e0303737e998a8e4f39b8ec760b6cea73c5986ca4385a684bbe34f275550e6c6

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 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.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

4 entries across 4 versions & 1 rubygems

Version Path
hyrax-3.3.0 app/helpers/hyrax/url_helper.rb
hyrax-3.2.0 app/helpers/hyrax/url_helper.rb
hyrax-3.1.0 app/helpers/hyrax/url_helper.rb
hyrax-3.0.2 app/helpers/hyrax/url_helper.rb