Commit 442415cb authored by Sean Arnold's avatar Sean Arnold

Add back changes to gon helper

parent 41686219
......@@ -61,15 +61,15 @@ module Gitlab
def push_frontend_feature_flag(name, *args, **kwargs)
enabled = Feature.enabled?(name, *args, **kwargs)
push_to_gon_features(name, enabled)
push_to_gon_attributes(:features, name, enabled)
end
def push_to_gon_features(name, enabled)
def push_to_gon_attributes(key, name, enabled)
var_name = name.to_s.camelize(:lower)
# Here the `true` argument signals gon that the value should be merged
# into any existing ones, instead of overwriting them. This allows you to
# use this method to push multiple feature flags.
gon.push({ features: { var_name => enabled } }, true)
gon.push({ key => { var_name => enabled } }, true)
end
def default_avatar_url
......
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