diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-27 19:53:16 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-19 12:58:53 +0300 |
commit | 9f9765485e998ece87660aa30a1b4339bb940d14 (patch) | |
tree | 0615fe12d0780847dee1c0dca8c0f0d59674048f /app/serializers/issuable_sidebar_todo_entity.rb | |
parent | 6c79e9307e116d6115f6d76ac796176952fb83cd (diff) |
Refactor sidebar to use data from serializer
Diffstat (limited to 'app/serializers/issuable_sidebar_todo_entity.rb')
-rw-r--r-- | app/serializers/issuable_sidebar_todo_entity.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/serializers/issuable_sidebar_todo_entity.rb b/app/serializers/issuable_sidebar_todo_entity.rb new file mode 100644 index 00000000000..b2c98433f05 --- /dev/null +++ b/app/serializers/issuable_sidebar_todo_entity.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class IssuableSidebarTodoEntity < Grape::Entity + include Gitlab::Routing + + expose :id + + expose :delete_path do |todo| + dashboard_todo_path(todo) if todo + end +end |