debian-mirror-gitlab/app/serializers/feature_flag_summary_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
411 B
Ruby
Raw Permalink Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
class FeatureFlagSummaryEntity < Grape::Entity
include RequestAwareEntity
expose :count do
expose :all do |project|
project.operations_feature_flags.count
end
expose :enabled do |project|
project.operations_feature_flags.enabled.count
end
expose :disabled do |project|
project.operations_feature_flags.disabled.count
end
end
end