From 929b9fdaff1e6d4223efd8f00bd0b53fae1c7ce1 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 21 Jun 2024 11:34:13 -0400 Subject: [PATCH] Remove exclusion for `Rails/LexicallyScopedActionFilter` cop (#30697) --- .rubocop/rails.yml | 4 ---- app/controllers/auth/registrations_controller.rb | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.rubocop/rails.yml b/.rubocop/rails.yml index b83928dee..4e08f1ab9 100644 --- a/.rubocop/rails.yml +++ b/.rubocop/rails.yml @@ -5,10 +5,6 @@ Rails/FilePath: Rails/HttpStatus: EnforcedStyle: numeric -Rails/LexicallyScopedActionFilter: - Exclude: - - app/controllers/auth/* # Conflicts with `Lint/UselessMethodDefinition` for inherited controller actions - Rails/NegateInclude: Enabled: false diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index f858c0ad9..e5a2ac027 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -25,6 +25,14 @@ class Auth::RegistrationsController < Devise::RegistrationsController super(&:build_invite_request) end + def edit # rubocop:disable Lint/UselessMethodDefinition + super + end + + def create # rubocop:disable Lint/UselessMethodDefinition + super + end + def update super do |resource| resource.clear_other_sessions(current_session.session_id) if resource.saved_change_to_encrypted_password?