summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-12-21 23:30:50 +0000
committerMike Greiling <mike@pixelcog.com>2018-12-21 23:30:50 +0000
commit06cef29a62fbab4174b669a6d5e2059f1f5d8756 (patch)
treed7539e2836ff95ddeae32d5d351bb9d624e12037 /app/models/user.rb
parent88094c44f5dc5d88f378a9c3a055687a7d09e6f1 (diff)
parent95aae95a1cbb55facd127c74d6c044b13533f3fe (diff)
downloadgitlab-ce-06cef29a62fbab4174b669a6d5e2059f1f5d8756.tar.gz
Merge branch '44984-use-serializer-for-issuable-sidebar' into 'master'
Resolve "Create a serializer to render issuables sidebar" Closes #44984 See merge request gitlab-org/gitlab-ce!23379
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 fe63f1ce100..26fd2d903a1 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