Sha256: fa04007a5fb1395667ee2e38524124d37c63f3f4865cb7b569cb547a6374c0d9

Contents?: true

Size: 758 Bytes

Versions: 24

Compression:

Stored size: 758 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 new GenericWork 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

24 entries across 24 versions & 1 rubygems

Version Path
curation_concerns-0.14.0.pre3 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.14.0.pre2 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.14.0.pre1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.13.1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.13.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre9 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre8 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre7 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre6 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre5 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre4 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre3 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre2 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.12.0.pre1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.11.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.11.0.rc1 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.10.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.9.0 app/helpers/curation_concerns/url_helper.rb
curation_concerns-0.8.0 app/helpers/curation_concerns/url_helper.rb