From 744f6ed12bf1ce543b4c903d27cfd8362e91795d Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 13 Dec 2018 10:12:13 +0000 Subject: Enable GraphQL API endpoint --- lib/constraints/feature_constrainer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/constraints') diff --git a/lib/constraints/feature_constrainer.rb b/lib/constraints/feature_constrainer.rb index ca4376a9d38..5f8d97c8cdc 100644 --- a/lib/constraints/feature_constrainer.rb +++ b/lib/constraints/feature_constrainer.rb @@ -2,14 +2,14 @@ module Constraints class FeatureConstrainer - attr_reader :feature + attr_reader :feature, :thing, :default_enabled - def initialize(feature) - @feature = feature + def initialize(feature, thing, default_enabled) + @feature, @thing, @default_enabled = feature, thing, default_enabled end def matches?(_request) - Feature.enabled?(feature) + Feature.enabled?(feature, @thing, default_enabled: true) end end end -- cgit v1.2.3