• 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/application_controller.rb
1
# frozen_string_literal: true
2

3
class ApplicationController < ActionController::Base
4✔
4
  include Pagy::Backend
4✔
5
  include AuthenticationConcern
4✔
6

7
  helper_method :current_user, :user_signed_in?
4✔
8

9
  before_action :authenticate_user!
4✔
10
  before_action :check_user_active, if: :user_signed_in?
4✔
11
  before_action :validate_session_timeout, if: :user_signed_in?
4✔
12
  after_action :expose_last_seen_for_tests, if: -> { Rails.env.test? }
462✔
13

14
  protect_from_forgery with: :exception
4✔
15

16
  before_action :set_paper_trail_whodunnit
4✔
17

18
  rescue_from CanCan::AccessDenied do |exception|
4✔
19
    flash[:alert] = exception.message
9✔
20
    redirect_to root_url
9✔
21
  end
22

23
  rescue_from ActionController::InvalidAuthenticityToken, with: :handle_invalid_auth_token
4✔
24
  rescue_from ActiveRecord::RecordNotFound, with: :render404
4✔
25

26
  private
4✔
27

28
  def handle_invalid_auth_token
4✔
29
    redirect_to root_path, alert: 'Your session has expired. Please sign in again.'
1✔
30
  end
31

32
  def render404
4✔
33
    respond_to do |format|
5✔
34
      format.html { render template: 'errors/not_found', status: :not_found }
10✔
35
      format.json { render json: { error: 'Not Found' }, status: :not_found }
5✔
36
    end
37
  end
38

39
  def expose_last_seen_for_tests
4✔
40
    response.headers['X-Last-Seen'] = session[:last_seen].to_s if session[:last_seen]
444✔
41
  end
42
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