Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build_serializer.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e0096dc7b4ad865e70dce1b8eed05024b18afde1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class BuildSerializer < BaseSerializer
  entity BuildEntity

  def only_status
    tap { @status_only = { only: [{ details: [:status] }] } }
  end

  def represent(resource, opts = {})
    if @status_only.present?
      opts.merge!(@status_only)
    end

    super(resource, opts)
  end
end