diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-28 00:53:16 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-19 17:58:53 +0800 |
commit | 9f9765485e998ece87660aa30a1b4339bb940d14 (patch) | |
tree | 0615fe12d0780847dee1c0dca8c0f0d59674048f /app/serializers/merge_request_serializer.rb | |
parent | 6c79e9307e116d6115f6d76ac796176952fb83cd (diff) | |
download | gitlab-ce-9f9765485e998ece87660aa30a1b4339bb940d14.tar.gz |
Refactor sidebar to use data from serializer
Diffstat (limited to 'app/serializers/merge_request_serializer.rb')
-rw-r--r-- | app/serializers/merge_request_serializer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/serializers/merge_request_serializer.rb b/app/serializers/merge_request_serializer.rb index e252d9a3501..4d236273d49 100644 --- a/app/serializers/merge_request_serializer.rb +++ b/app/serializers/merge_request_serializer.rb @@ -7,9 +7,9 @@ class MergeRequestSerializer < BaseSerializer def represent(merge_request, opts = {}) entity = case opts[:serializer] - when 'sidebar_extras' - opts[:include_basic] = false - opts[:include_extras] = true + when 'sidebar', 'sidebar_extras' + opts[:include_basic] = (opts[:serializer] == 'sidebar') + opts[:include_extras] = (opts[:serializer] == 'sidebar_extras') MergeRequestSidebarEntity when 'basic' MergeRequestBasicEntity |