Refactor show_file_links.html.erb to reduce duplication.
authorBrett Smith <brett@curoverse.com>
Thu, 19 Jun 2014 19:14:57 +0000 (15:14 -0400)
committerBrett Smith <brett@curoverse.com>
Thu, 19 Jun 2014 19:15:11 +0000 (15:15 -0400)
No issue #, just something I did while working on the previous commit.

apps/workbench/app/views/collections/show_file_links.html.erb

index 22baaa87836601f341fc6a792dd5b001e621b1c1..042e4ff71f7de8a7fca3f478e36950de6c3d99a0 100644 (file)
@@ -59,9 +59,7 @@ the entire collection with wget, try:</p>
       <ul class="collection_files">
     <% else %>
       <%= link_to(filename,
-                  {controller: 'collections', action: 'show_file',
-                   uuid: @object.uuid, file: file_path,
-                   reader_token: params[:reader_token]},
+                  link_opts.merge(file: file_path),
                   {title: "Download #{file_path}"}) %>
       </li>
     <% end %>