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

pulibrary / pdc_describe / 9091a1ae-29be-458c-984a-339d213919c4

12 Dec 2024 07:41PM UTC coverage: 26.434% (-69.7%) from 96.113%
9091a1ae-29be-458c-984a-339d213919c4

Pull #2000

circleci

jrgriffiniii
Removing integration with ActiveStorage
Pull Request #2000: Bump actionpack from 7.2.1.1 to 7.2.2.1

945 of 3575 relevant lines covered (26.43%)

0.35 hits per line

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

27.27
/app/controllers/works_wizard_policy_controller.rb
1
# frozen_string_literal: true
2

3
require "nokogiri"
1✔
4
require "open-uri"
1✔
5

6
# Controller to handle the policy agreement acknowlegdement before the wizard is started
7
#
8
# The wizard flow is shown in the [mermaid diagram here](https://github.com/pulibrary/pdc_describe/blob/main/docs/wizard_flow.md).
9
#
10
class WorksWizardPolicyController < ApplicationController
1✔
11
  # get /works/policy
12
  def show; end
×
13

14
  # post /works/policy
15
  def update
×
16
    group = Group.find_by(code: params[:group_code]) || current_user.default_group
×
17
    if params[:agreement] == "1"
×
18
      work = Work.create!(created_by_user_id: current_user.id, group:)
×
19
      work.add_provenance_note(DateTime.now, "User agreed to the Data Acceptance and Retention policy", current_user.id)
×
20
      redirect_to work_create_new_submission_path(work)
×
21
    else
22
      redirect_to root_path, notice: "You must agree to the policy to deposit"
×
23
    end
24
  end
25
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