diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-02-20 12:01:50 -0800 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-02-20 12:01:55 -0800 |
commit | 42cbcb23478f7b07c0c49e0020a8d3c834322e87 (patch) | |
tree | 58abbccf9dc9d40c147658ea293c6f3aed4a82e7 /app/helpers/todos_helper.rb | |
parent | d53ae7f14d7c24ee590ba57632d267ec01706aa4 (diff) | |
download | gitlab-ce-42cbcb23478f7b07c0c49e0020a8d3c834322e87.tar.gz |
"X assigned you Y" instead of "X assigned Y"
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 9bcfbd2da35..4b745a5b969 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -7,6 +7,13 @@ module TodosHelper current_user.todos.done.count end + def todo_action_name(todo) + case todo.action + when Todo::ASSIGNED then 'assigned you' + when Todo::MENTIONED then 'mentioned you on' + end + end + def todo_target_link(todo) target = todo.target_type.titleize.downcase link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo) |