diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-02 19:44:55 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-02 19:44:55 +0300 |
commit | 9240118691c4abf3e5a5f59e7569ad04c6fa7198 (patch) | |
tree | 08e20a92853c776eef259a8262e7edfa73fcb99f /app/models | |
parent | 23c353515f9d2472a944a21cc1d9a3c89556dd48 (diff) | |
parent | 66eae48eb56cff77f5e68ffb2a271e3a66df606a (diff) |
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.rb | 1 |
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. # |