Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-11 22:04:42 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2016-07-01 11:49:34 +0300
commita1f224d3f7b43bf2f58917e5045dcc2bdb33964d (patch)
treeef8559f8b042a87e377779a51b0badb43b31fe97 /app/models/todo.rb
parentab81ea1e8177742a0dfed2c7cf922bb03a8b6c51 (diff)
Add Todos API
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 2792fa9b9a8..42faecdf7f2 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -34,6 +34,13 @@ class Todo < ActiveRecord::Base
action == BUILD_FAILED
end
+ def action_name
+ case action
+ when Todo::ASSIGNED then 'assigned you'
+ when Todo::MENTIONED then 'mentioned you on'
+ end
+ end
+
def body
if note.present?
note.note