Skip to content
Snippets Groups Projects

Stop passing type to Feature methods

Merged Rémy Coutable requested to merge stop-passing-type-to-feature-methods into master
Files
26
@@ -40,8 +40,10 @@ def fetch_plan_limit_data
def scoped_plan_limits
scope_relation = self.public_send(limit_scope) # rubocop:disable GitlabSecurity/PublicSend
return unless scope_relation
return if limit_feature_flag && ::Feature.disabled?(limit_feature_flag, scope_relation)
return if limit_feature_flag_for_override && ::Feature.enabled?(limit_feature_flag_for_override, scope_relation)
return if limit_feature_flag && ::Feature.disabled?(limit_feature_flag, scope_relation, type: :undefined)
return if limit_feature_flag_for_override &&
::Feature.enabled?(limit_feature_flag_for_override, scope_relation, type: :undefined)
relation = limit_relation ? self.public_send(limit_relation) : self.class.where(limit_scope => scope_relation) # rubocop:disable GitlabSecurity/PublicSend
limits = scope_relation.actual_limits
Loading