diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-03-27 12:34:05 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-03-27 12:34:05 -0300 |
commit | bc99cbddf9ef003ba18df3b7ed0aa348025e2009 (patch) | |
tree | 8f4d796e7f6f1f1b5aebc4b40d6f74351b053e62 | |
parent | e68d6da7429b6d4344488ced677e844783caae84 (diff) | |
download | gitlab-ce-changes_tab_vue_refactoring.tar.gz |
Expose note urlchanges_tab_vue_refactoring
-rw-r--r-- | app/serializers/note_entity.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/note_entity.rb b/app/serializers/note_entity.rb index 4ccf0bca476..9826ffb7156 100644 --- a/app/serializers/note_entity.rb +++ b/app/serializers/note_entity.rb @@ -1,5 +1,6 @@ class NoteEntity < API::Entities::Note include RequestAwareEntity + include NotesHelper expose :type @@ -57,6 +58,10 @@ class NoteEntity < API::Entities::Note end end + expose :noteable_note_url do |note| + noteable_note_url(note) + end + expose :resolve_path, if: -> (note, _) { note.part_of_discussion? && note.resolvable? } do |note| resolve_project_merge_request_discussion_path(note.project, note.noteable, note.discussion_id) end |