diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-03-11 16:04:42 -0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-07-01 10:49:34 +0200 |
commit | a1f224d3f7b43bf2f58917e5045dcc2bdb33964d (patch) | |
tree | ef8559f8b042a87e377779a51b0badb43b31fe97 /app/models/todo.rb | |
parent | ab81ea1e8177742a0dfed2c7cf922bb03a8b6c51 (diff) | |
download | gitlab-ce-a1f224d3f7b43bf2f58917e5045dcc2bdb33964d.tar.gz |
Add Todos API
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r-- | app/models/todo.rb | 7 |
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 |