Sha256: 06b7fa530e36e817089fa9806e6b511b3607ea23794a1c6240ab285cc49d6509

Contents?: true

Size: 455 Bytes

Versions: 6

Compression:

Stored size: 455 Bytes

Contents

module Worthwhile
  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.kind_of? Worthwhile::GenericFile
        curation_concern_generic_file_path(doc)
      elsif doc.collection?
        doc
      else
        polymorphic_path([:curation_concern, doc])
      end
    end 
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
worthwhile-0.1.2 app/helpers/worthwhile/url_helper.rb
worthwhile-0.1.1 app/helpers/worthwhile/url_helper.rb
worthwhile-0.1.0 app/helpers/worthwhile/url_helper.rb
worthwhile-0.0.3 app/helpers/worthwhile/url_helper.rb
worthwhile-0.0.2 app/helpers/worthwhile/url_helper.rb
worthwhile-0.0.1 app/helpers/worthwhile/url_helper.rb