mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Apply syntax_tree formatting to app/*
This commit is contained in:
@@ -14,9 +14,11 @@ class AssociatedGroup < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.cleanup!
|
||||
AssociatedGroup.left_joins(:group_associated_groups, :user_associated_groups)
|
||||
AssociatedGroup
|
||||
.left_joins(:group_associated_groups, :user_associated_groups)
|
||||
.where("group_associated_groups.id IS NULL AND user_associated_groups.id IS NULL")
|
||||
.where("last_used < ?", 1.week.ago).delete_all
|
||||
.where("last_used < ?", 1.week.ago)
|
||||
.delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user