diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-12-03 09:23:38 -0600 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-12-04 08:44:21 -0600 |
commit | 2674830e4df3f6509bd63ebfd048bc6a4e7053ab (patch) | |
tree | ddf982d821a7ce32d275f841f6ce3fb14f5a78a9 /app/serializers/issue_serializer.rb | |
parent | bba23151a1c0b4dff8f2c31301c5d0589876251d (diff) | |
download | gitlab-ce-2674830e4df3f6509bd63ebfd048bc6a4e7053ab.tar.gz |
Extract code into IssueBoardEntity
Diffstat (limited to 'app/serializers/issue_serializer.rb')
-rw-r--r-- | app/serializers/issue_serializer.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/serializers/issue_serializer.rb b/app/serializers/issue_serializer.rb index 37cf5e28396..d66f0a5acb7 100644 --- a/app/serializers/issue_serializer.rb +++ b/app/serializers/issue_serializer.rb @@ -4,15 +4,17 @@ class IssueSerializer < BaseSerializer # This overrided method takes care of which entity should be used # to serialize the `issue` based on `basic` key in `opts` param. # Hence, `entity` doesn't need to be declared on the class scope. - def represent(merge_request, opts = {}) + def represent(issue, opts = {}) entity = case opts[:serializer] when 'sidebar' IssueSidebarEntity + when 'board' + IssueBoardEntity else IssueEntity end - super(merge_request, opts, entity) + super(issue, opts, entity) end end |