diff options
author | Logan King <logan.c.king@gmail.com> | 2019-03-22 12:28:25 -0600 |
---|---|---|
committer | Logan King <logan.c.king@gmail.com> | 2019-03-22 12:28:25 -0600 |
commit | 66eae48eb56cff77f5e68ffb2a271e3a66df606a (patch) | |
tree | 32949944a6b3a0c8365be4ca1fece061016ed3b1 | |
parent | 85a1acbe50a3db74d0298fc622170f0fd000988d (diff) | |
download | gitlab-ce-66eae48eb56cff77f5e68ffb2a271e3a66df606a.tar.gz |
Add with_dashboard scope to Userce-8317-operations-dashboard-usage-ping
-rw-r--r-- | app/models/user.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d2be26370ff..c1648008b6c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -276,6 +276,7 @@ class User < ApplicationRecord 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) } + scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) } # Limits the users to those that have TODOs, optionally in the given state. # |