Commit 3c9d1d03 authored by Ragnar-H's avatar Ragnar-H

Use push_to_gon_features instead of touching gon directly

parent 5f784701
......@@ -50,7 +50,7 @@ class Projects::IssuesController < Projects::ApplicationController
real_time_feature_flag = :real_time_issue_sidebar
real_time_enabled = Gitlab::ActionCable::Config.in_app? || Feature.enabled?(real_time_feature_flag, @project)
gon.push({ features: { real_time_feature_flag.to_s.camelize(:lower) => real_time_enabled } }, true)
push_to_gon_features(real_time_feature_flag, real_time_enabled)
record_experiment_user(:invite_members_version_a)
record_experiment_user(:invite_members_version_b)
......
......@@ -23,7 +23,6 @@ class Groups::UsageQuotasController < Groups::ApplicationController
end
def push_additional_repo_storage_by_namespace_feature_flag
additional_repo_storage_by_namespace_flag = :additional_repo_storage_by_namespace
gon.push({ features: { additional_repo_storage_by_namespace_flag.to_s.camelize(:lower) => @group.additional_repo_storage_by_namespace_enabled? } }, true)
push_to_gon_features(:additional_repo_storage_by_namespace, @group.additional_repo_storage_by_namespace_enabled?)
end
end
......@@ -13,7 +13,6 @@ class Profiles::UsageQuotasController < Profiles::ApplicationController
end
def push_additional_repo_storage_by_namespace_feature_flag
additional_repo_storage_by_namespace_flag = :additional_repo_storage_by_namespace
gon.push({ features: { additional_repo_storage_by_namespace_flag.to_s.camelize(:lower) => current_user.namespace.additional_repo_storage_by_namespace_enabled? } }, true)
push_to_gon_features(:additional_repo_storage_by_namespace, current_user.namespace.additional_repo_storage_by_namespace_enabled?)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment