]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Rails/WhereMissing (#37248).
authorGo MAEDA <maeda@farend.jp>
Fri, 28 Oct 2022 00:47:56 +0000 (00:47 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 28 Oct 2022 00:47:56 +0000 (00:47 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@21927 e93f8b46-1217-0410-a6f0-8f06a7374b81

db/migrate/20220224194639_delete_orphaned_time_entry_activities.rb

index 899fc5892d324a99da249bce4da98e6946ebc538..887b7bcabcae276046ce70572aef326472dda780 100644 (file)
@@ -1,6 +1,6 @@
 class DeleteOrphanedTimeEntryActivities < ActiveRecord::Migration[6.1]
   def self.up
-    TimeEntryActivity.left_outer_joins(:project).where(projects: {id: nil}).where.not(project_id: nil).delete_all
+    TimeEntryActivity.where.missing(:project).where.not(project_id: nil).delete_all
   end
 
   def self.down