diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-30 12:03:35 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-20 07:28:28 +0800 |
commit | 95aae95a1cbb55facd127c74d6c044b13533f3fe (patch) | |
tree | 6ecf27a219ee09f9e9d294d8304df2cb93c4da3d /app/serializers/merge_request_serializer.rb | |
parent | 48d2c02efe7697914591d7381ce1c72d68eed336 (diff) | |
download | gitlab-ce-95aae95a1cbb55facd127c74d6c044b13533f3fe.tar.gz |
Code style changes and refactor
Diffstat (limited to 'app/serializers/merge_request_serializer.rb')
-rw-r--r-- | app/serializers/merge_request_serializer.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/serializers/merge_request_serializer.rb b/app/serializers/merge_request_serializer.rb index 4d236273d49..4cf84336aa4 100644 --- a/app/serializers/merge_request_serializer.rb +++ b/app/serializers/merge_request_serializer.rb @@ -7,10 +7,10 @@ class MergeRequestSerializer < BaseSerializer def represent(merge_request, opts = {}) entity = case opts[:serializer] - when 'sidebar', 'sidebar_extras' - opts[:include_basic] = (opts[:serializer] == 'sidebar') - opts[:include_extras] = (opts[:serializer] == 'sidebar_extras') - MergeRequestSidebarEntity + when 'sidebar' + MergeRequestSidebarBasicEntity + when 'sidebar_extras' + IssuableSidebarExtrasEntity when 'basic' MergeRequestBasicEntity else |