summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2018-11-28 00:53:16 +0800
committerHeinrich Lee Yu <hleeyu@gmail.com>2018-12-19 17:58:53 +0800
commit9f9765485e998ece87660aa30a1b4339bb940d14 (patch)
tree0615fe12d0780847dee1c0dca8c0f0d59674048f /app/models/user.rb
parent6c79e9307e116d6115f6d76ac796176952fb83cd (diff)
downloadgitlab-ce-9f9765485e998ece87660aa30a1b4339bb940d14.tar.gz
Refactor sidebar to use data from serializer
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f20756d1cc3..6b60932a1b2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1422,6 +1422,10 @@ class User < ActiveRecord::Base
todos.where(id: ids)
end
+ def pending_todo_for(target)
+ todos.find_by(target: target, state: :pending)
+ end
+
# @deprecated
alias_method :owned_or_masters_groups, :owned_or_maintainers_groups