summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-18 00:42:36 +0200
committerDouwe Maan <douwe@selenight.nl>2016-06-18 00:42:36 +0200
commitb218e82b5c8dca6bdf84e160f47145fdc458a40c (patch)
tree7ac79863e34ceeefe08f14babf6ca37bbde4455b /app/helpers
parent5ef749b7ad940945340a726777a83f9098ed8791 (diff)
parent914f97310815365f083a38b02d8dbf6c99b63b5f (diff)
downloadgitlab-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.rb6
-rw-r--r--app/helpers/todos_helper.rb2
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