• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_describe / 7ae96b6b-0a64-4479-9fa1-8ba6526e2c87

20 Mar 2024 12:42PM UTC coverage: 30.068% (-66.2%) from 96.266%
7ae96b6b-0a64-4479-9fa1-8ba6526e2c87

Pull #1701

circleci

leefaisonr
makes it so that links open in new window
Pull Request #1701: Update language on submission form

1019 of 3389 relevant lines covered (30.07%)

0.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/controllers/work_downloader_controller.rb
1
# frozen_string_literal: true
2
class WorkDownloaderController < ApplicationController
×
3
  def download
×
4
    work = Work.find(params[:id])
×
5
    if current_user && work.editable_by?(current_user)
×
6
      file_name = params[:filename]
×
7
      mode = work.approved? ? "postcuration" : "precuration"
×
8
      service = S3QueryService.new(work, mode)
×
9
      uri = service.file_url(file_name)
×
10
      redirect_to uri
×
11
    else
×
12
      Honeybadger.notify("Can not download work: #{work.id} is not editable by #{current_user.uid}")
×
13
      redirect_to root_path, notice: I18n.t("works.download.privs")
×
14
    end
×
15
  end
×
16
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc