Rails/ApplicationController

This commit is contained in:
Jared Beck 2021-08-29 23:10:29 -04:00
parent 12cb4459a8
commit 34cec183eb
3 changed files with 2 additions and 8 deletions

View File

@ -21,12 +21,6 @@ Metrics/CyclomaticComplexity:
Metrics/PerceivedComplexity:
Max: 9 # Goal: 7
# Offense count: 1
# Cop supports --auto-correct.
Rails/ApplicationController:
Exclude:
- 'spec/dummy_app/app/controllers/test_controller.rb'
# Offense count: 56
# Cop supports --auto-correct.
Rails/ApplicationRecord:

View File

@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
before_action :modify_current_user
# PT used to add this callback automatically. Now people are required to add
# it themsevles, like this, allowing them to control the order of callbacks.
# it themselves, like this, allowing them to control the order of callbacks.
# The `modify_current_user` callback above shows why this control is useful.
before_action :set_paper_trail_whodunnit

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
class TestController < ActionController::Base
class TestController < ApplicationController
def user_for_paper_trail
Thread.current.object_id
end