Merge branch 'bvl-multiple-codeowner-approval-rules-ce' into 'master'
Add a scope to preload emails on a user See merge request gitlab-org/gitlab-ce!25051
This commit is contained in:
commit
7b84ec0025
|
@ -275,6 +275,7 @@ class User < ApplicationRecord
|
|||
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
||||
scope :by_username, -> (usernames) { iwhere(username: Array(usernames).map(&:to_s)) }
|
||||
scope :for_todos, -> (todos) { where(id: todos.select(:user_id)) }
|
||||
scope :with_emails, -> { preload(:emails) }
|
||||
|
||||
# Limits the users to those that have TODOs, optionally in the given state.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue