From 5ee801a9fc00a00c118cef3b937046e9f01b89ff Mon Sep 17 00:00:00 2001 From: r7kamura Date: Wed, 27 Nov 2024 11:51:18 +0900 Subject: [PATCH] Add comment about false-negatives on cached Migration/RemoveColumn --- lib/rubocop/cop/migration/remove_column.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rubocop/cop/migration/remove_column.rb b/lib/rubocop/cop/migration/remove_column.rb index 7c84325..31f9854 100644 --- a/lib/rubocop/cop/migration/remove_column.rb +++ b/lib/rubocop/cop/migration/remove_column.rb @@ -10,6 +10,9 @@ module Migration # # Active Record caches database columns at runtime, so if you drop a column, it can cause exceptions until your app reboots. # + # Note that since this cop goes to read arbitrary model files, + # false negatives occur in situations where RuboCop's cache is being used. + # # @safety # The logic to check if it is included in `ignored_columns` may fail. #