Rails/ApplicationController
This commit is contained in:
parent
12cb4459a8
commit
34cec183eb
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue