Sha256: 6e36d16f5cca921712277bb6a8a656117c24589d42a3d6b48ead474a024e7b0e

Contents?: true

Size: 742 Bytes

Versions: 27

Compression:

Stored size: 742 Bytes

Contents

module CurationConcerns
  module UrlHelper
    # override Blacklight so we can use our 'curation_concern' namespace
    # We may also pass in a ActiveFedora document instead of a SolrDocument
    def url_for_document(doc, _options = {})
      if doc.collection?
        doc
      else
        polymorphic_path([main_app, doc])
      end
    end

    # generated models get registered as curation concerns and need a
    # track_model_path to render Blacklight-related views
    (['FileSet', 'Collection'] + CurationConcerns.config.registered_curation_concern_types).each do |concern|
      define_method("track_#{concern.constantize.model_name.singular_route_key}_path") { |*args| main_app.track_solr_document_path(*args) }
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
curation_concerns-1.6.3 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.6.2 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.6.1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.6.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.5.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.4.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.3.3 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.3.2 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.3.1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.3.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.2.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.1.2 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.1.1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.1.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0.beta10 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0.beta9 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0.beta8 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0.beta7 app/helpers/curation_concerns/url_helper.rb
curation_concerns-1.0.0.beta6 app/helpers/curation_concerns/url_helper.rb