Module: CurationConcerns::UrlHelper

Included in:
MainAppHelpers
Defined in:
app/helpers/curation_concerns/url_helper.rb

Instance Method Summary collapse

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



5
6
7
8
9
10
11
# File 'app/helpers/curation_concerns/url_helper.rb', line 5

def url_for_document(doc, _options = {})
  if doc.collection?
    doc
  else
    polymorphic_path([main_app, doc])
  end
end