From 34cec183eb031ad907554c9a8e0da8653c0f5f17 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Sun, 29 Aug 2021 23:10:29 -0400 Subject: [PATCH] Rails/ApplicationController --- .rubocop_todo.yml | 6 ------ spec/dummy_app/app/controllers/application_controller.rb | 2 +- spec/dummy_app/app/controllers/test_controller.rb | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ae61b6b4..9d062ec4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: diff --git a/spec/dummy_app/app/controllers/application_controller.rb b/spec/dummy_app/app/controllers/application_controller.rb index 92838872..bb999f02 100644 --- a/spec/dummy_app/app/controllers/application_controller.rb +++ b/spec/dummy_app/app/controllers/application_controller.rb @@ -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 diff --git a/spec/dummy_app/app/controllers/test_controller.rb b/spec/dummy_app/app/controllers/test_controller.rb index da41c690..04a66819 100644 --- a/spec/dummy_app/app/controllers/test_controller.rb +++ b/spec/dummy_app/app/controllers/test_controller.rb @@ -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