summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-02 16:44:55 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-02 16:44:55 +0000
commit9240118691c4abf3e5a5f59e7569ad04c6fa7198 (patch)
tree08e20a92853c776eef259a8262e7edfa73fcb99f /app/models
parent23c353515f9d2472a944a21cc1d9a3c89556dd48 (diff)
parent66eae48eb56cff77f5e68ffb2a271e3a66df606a (diff)
downloadgitlab-ce-9240118691c4abf3e5a5f59e7569ad04c6fa7198.tar.gz
Merge branch 'ce-8317-operations-dashboard-usage-ping' into 'master'
Add dashboard scope for operations dashboard usage ping See merge request gitlab-org/gitlab-ce!26727
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index e0c518a9b75..b426d100537 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.
#