From 88b4f1defc441c49d2408b3881ee4482b203eb7c Mon Sep 17 00:00:00 2001 From: Jeff Chiu Date: Wed, 24 May 2017 13:54:44 -0400 Subject: [PATCH] cleanup: pass @document_list to helper method as arg --- app/helpers/blacklight_ris_helper.rb | 4 ++-- app/views/bookmarks/index.ris.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/blacklight_ris_helper.rb b/app/helpers/blacklight_ris_helper.rb index c82faae..a1979b5 100644 --- a/app/helpers/blacklight_ris_helper.rb +++ b/app/helpers/blacklight_ris_helper.rb @@ -10,8 +10,8 @@ def ris_path(opts = {}) end end - def render_ris - @document_list.map {|x| x.export_as(:ris)}.compact.join("\n") + def render_ris(documents) + documents.map {|x| x.export_as(:ris)}.compact.join("\n") end end diff --git a/app/views/bookmarks/index.ris.erb b/app/views/bookmarks/index.ris.erb index 9e823a9..2cce89e 100644 --- a/app/views/bookmarks/index.ris.erb +++ b/app/views/bookmarks/index.ris.erb @@ -1 +1 @@ -<%= render_ris %> \ No newline at end of file +<%= render_ris(@document_list) %> \ No newline at end of file