DEV: Add delegated Group#human_users scope (#25398)

Some preparatory refactoring as we're working on TL groups for the system user. On User we have a scope #human_users to exclude the system user, DiscoBot, etc. This PR adds the same scope (delegated to User) on Group.
This commit is contained in:
Ted Johansson
2024-01-24 13:33:05 +08:00
committed by GitHub
parent 85d74ec8bf
commit 32e2a1fd4a
2 changed files with 21 additions and 24 deletions

View File

@@ -24,6 +24,7 @@ class Group < ActiveRecord::Base
has_many :categories, through: :category_groups
has_many :users, through: :group_users
has_many :human_users, -> { human_users }, through: :group_users, source: :user
has_many :requesters, through: :group_requests, source: :user
has_many :group_histories, dependent: :destroy
has_many :category_reviews,