Module: Worthwhile::UrlHelper
- Included in:
- MainAppHelpers
- Defined in:
- app/helpers/worthwhile/url_helper.rb
Instance Method Summary collapse
-
#url_for_document(doc, options = {}) ⇒ Object
override Blacklight so we can use our ‘curation_concern’ namespace We may also pass in a ActiveFedora document instead of a SolrDocument.
Instance Method Details
#url_for_document(doc, options = {}) ⇒ Object
override Blacklight so we can use our ‘curation_concern’ namespace We may also pass in a ActiveFedora document instead of a SolrDocument
6 7 8 9 10 11 12 13 14 |
# File 'app/helpers/worthwhile/url_helper.rb', line 6 def url_for_document doc, = {} if doc.kind_of? Worthwhile::GenericFile curation_concern_generic_file_path(doc) elsif doc.collection? doc else polymorphic_path([:curation_concern, doc]) end end |