Module: BlacklightRisHelper

Defined in:
app/helpers/blacklight_ris_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_ris(documents) ⇒ Object



13
14
15
# File 'app/helpers/blacklight_ris_helper.rb', line 13

def render_ris(documents)
  documents.map {|x| x.export_as(:ris)}.compact.join("\n")
end

#ris_path(opts = {}) ⇒ Object

this helper is called from the Show view and Bookmarks view



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

def ris_path(opts = {})
  if controller_name == "bookmarks"
    bookmarks_path(format: 'ris')
  else
    solr_document_path(format: 'ris')
  end
end