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

uclibs / aaec / cb7b84d2-db6a-4567-9fe3-b4a96aea967c

13 Mar 2024 02:43PM UTC coverage: 75.46% (-24.4%) from 99.874%
cb7b84d2-db6a-4567-9fe3-b4a96aea967c

Pull #400

circleci

Janell-Huyck
Inform coveralls of parallelism, adjust config file
Pull Request #400: WIP 399 - Add parallelism to .circleci/config.yml

615 of 815 relevant lines covered (75.46%)

11.92 hits per line

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

86.84
/app/controllers/submitters_controller.rb
1
# frozen_string_literal: true
2

3
class SubmittersController < ApplicationController
1✔
4
  include SubmitterOwnershipGuard
1✔
5

6
  skip_before_action :require_authenticated_user, only: %i[new create finished]
1✔
7

8
  before_action :set_submitter, only: %i[show edit update]
1✔
9

10
  # GET /submitters/1
11
  # GET /submitters/1.json
12
  def show; end
1✔
13

14
  # GET /submitters/new
15
  def new
1✔
16
    @submitter = Submitter.new
13✔
17
  end
18

19
  # GET /submitters/1/edit
20
  def edit; end
1✔
21

22
  # POST /submitters
23
  # POST /submitters.json
24
  def create
1✔
25
    @submitter = Submitter.new(submitter_params)
9✔
26

27
    respond_to do |format|
9✔
28
      if @submitter.save
9✔
29
        reset_session
9✔
30
        session[:submitter_id] = @submitter.id
9✔
31

32
        flash.keep[:success] = 'Your account was successfully created.'
9✔
33
        format.html { redirect_to publications_path }
18✔
34
        format.json { render :show, status: :created, location: @submitter }
9✔
35
      else
36
        format.html { render :new, status: :unprocessable_entity }
×
37
        format.json { render json: @submitter.errors, status: :unprocessable_entity }
×
38
      end
39
    end
40
  end
41

42
  # PATCH/PUT /submitters/1
43
  # PATCH/PUT /submitters/1.json
44
  def update
1✔
45
    respond_to do |format|
1✔
46
      if @submitter.update(submitter_params)
1✔
47
        flash.keep[:success] = 'Your account was successfully updated.'
1✔
48
        format.html { redirect_to publications_path }
2✔
49
        format.json { render :show, status: :ok, location: @submitter }
1✔
50
      else
51
        format.html { render :edit, status: :unprocessable_entity }
×
52
        format.json { render json: @submitter.errors, status: :unprocessable_entity }
×
53
      end
54
    end
55
  end
56

57
  def finished
1✔
58
    admin = session[:admin]
1✔
59
    reset_session
1✔
60
    if admin.nil?
1✔
61
      render 'pages/finished'
×
62
    else
63
      redirect_to root_path
1✔
64
    end
65
  end
66

67
  private
1✔
68

69
  # Use callbacks to share common setup or constraints between actions.
70
  def set_submitter
1✔
71
    @submitter = Submitter.find_by(id: params[:id])
5✔
72
  end
73

74
  # Never trust parameters from the scary internet, only allow the white list through.
75
  def submitter_params
1✔
76
    params.require(:submitter).permit(:first_name, :last_name, :department, :mailing_address, :phone_number, :email_address, :college)
10✔
77
  end
78
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

© 2026 Coveralls, Inc