From 89ef45dde42bbaad2e4e9d16fc7378a3f18b804b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sat, 13 Jul 2024 08:57:51 +0000 Subject: [PATCH] Naming/MemoizedInstanceVariableName --- .rubocop_todo.yml | 8 -------- lib/generators/comment/comment_generator.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 315b795..4389858 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -38,14 +38,6 @@ Metrics/MethodLength: Metrics/PerceivedComplexity: Max: 13 -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: EnforcedStyleForLeadingUnderscores. -# SupportedStylesForLeadingUnderscores: disallowed, required, optional -Naming/MemoizedInstanceVariableName: - Exclude: - - 'lib/generators/comment/comment_generator.rb' - # Offense count: 2 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ diff --git a/lib/generators/comment/comment_generator.rb b/lib/generators/comment/comment_generator.rb index 48f0add..3f1b157 100644 --- a/lib/generators/comment/comment_generator.rb +++ b/lib/generators/comment/comment_generator.rb @@ -4,7 +4,7 @@ class CommentGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root - @_acts_as_commentable_source_root ||= File.expand_path('templates', __dir__) + @source_root ||= File.expand_path('templates', __dir__) end def self.next_migration_number(_path)