diff options
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 4630552e02e..f772e3f6907 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -282,6 +282,7 @@ class User < ApplicationRecord scope :for_todos, -> (todos) { where(id: todos.select(:user_id)) } scope :with_emails, -> { preload(:emails) } scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) } + scope :has_starred, ->(project) { joins(:users_star_projects).where('users_star_projects.project_id': project.id) } # Limits the users to those that have TODOs, optionally in the given state. # |