diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-06-18 00:42:36 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-06-18 00:42:36 +0200 |
commit | b218e82b5c8dca6bdf84e160f47145fdc458a40c (patch) | |
tree | 7ac79863e34ceeefe08f14babf6ca37bbde4455b /app/helpers | |
parent | 5ef749b7ad940945340a726777a83f9098ed8791 (diff) | |
parent | 914f97310815365f083a38b02d8dbf6c99b63b5f (diff) | |
download | gitlab-ce-b218e82b5c8dca6bdf84e160f47145fdc458a40c.tar.gz |
Merge branch 'issuable-todo-improvements'
# Conflicts:
# app/controllers/projects/todos_controller.rb
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/todos_helper.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 8dbc51a689f..8231ce49fac 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -67,9 +67,9 @@ module IssuablesHelper end end - def has_todo(issuable) - unless current_user.nil? - current_user.todos.find_by(target_id: issuable.id, state: :pending) + def issuable_todo(issuable) + if current_user + current_user.todos.find_by(target: issuable, state: :pending) end end diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index e1d8517f712..a832a6c8df7 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -12,7 +12,7 @@ module TodosHelper when Todo::ASSIGNED then 'assigned you' when Todo::MENTIONED then 'mentioned you on' when Todo::BUILD_FAILED then 'The build failed for your' - when Todo::MARKED then 'marked this as a Todo for' + when Todo::MARKED then 'added a todo for' end end |