Skip to content

Commit

Permalink
Rails/ApplicationController
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbeck committed Aug 30, 2021
1 parent 12cb445 commit 34cec18
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_app/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_app/app/controllers/test_controller.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 34cec18

Please sign in to comment.