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

uclibs / treatment_database / 2ed3c114-bc57-4a8f-be70-bcf6c5a1cdc2

06 May 2025 02:54PM UTC coverage: 99.536%. Remained the same
2ed3c114-bc57-4a8f-be70-bcf6c5a1cdc2

push

circleci

Janell-Huyck
Bump rubocop-rails from 2.30.3 to 2.31.0

Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.30.3 to 2.31.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.30.3...v2.31.0)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-version: 2.31.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

644 of 647 relevant lines covered (99.54%)

51.69 hits per line

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

100.0
/app/controllers/staff_codes_controller.rb
1
# frozen_string_literal: true
2

3
class StaffCodesController < ApplicationController
3✔
4
  before_action :set_staff_code, only: %i[show edit update]
3✔
5
  load_and_authorize_resource
3✔
6

7
  # GET /staff_codes or /staff_codes.json
8
  def index
3✔
9
    @staff_codes = StaffCode.all
5✔
10
  end
11

12
  # GET /staff_codes/1 or /staff_codes/1.json
13
  def show; end
3✔
14

15
  # GET /staff_codes/new
16
  def new
3✔
17
    @staff_code = StaffCode.new
2✔
18
  end
19

20
  # GET /staff_codes/1/edit
21
  def edit; end
3✔
22

23
  # POST /staff_codes or /staff_codes.json
24
  def create
3✔
25
    @staff_code = StaffCode.new(staff_code_params)
4✔
26

27
    respond_to do |format|
4✔
28
      if @staff_code.save
4✔
29
        format.html { redirect_to @staff_code, notice: 'Staff code was successfully created.' }
6✔
30
        format.json { render :show, status: :created, location: @staff_code }
3✔
31
      else
32
        format.html { render :new, status: :unprocessable_entity }
2✔
33
        format.json { render json: @staff_code.errors, status: :unprocessable_entity }
1✔
34
      end
35
    end
36
  end
37

38
  # PATCH/PUT /staff_codes/1 or /staff_codes/1.json
39
  def update
3✔
40
    respond_to do |format|
3✔
41
      if @staff_code.update(staff_code_params)
3✔
42
        format.html { redirect_to @staff_code, notice: 'Staff code was successfully updated.' }
4✔
43
        format.json { render :show, status: :ok, location: @staff_code }
2✔
44
      else
45
        format.html { render :edit, status: :unprocessable_entity }
2✔
46
        format.json { render json: @staff_code.errors, status: :unprocessable_entity }
1✔
47
      end
48
    end
49
  end
50

51
  private
3✔
52

53
  # Use callbacks to share common setup or constraints between actions.
54
  def set_staff_code
3✔
55
    @staff_code = StaffCode.find(params[:id])
11✔
56
  end
57

58
  # Only allow a list of trusted parameters through.
59
  def staff_code_params
3✔
60
    params.require(:staff_code).permit(:code, :points)
11✔
61
  end
62
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