Module: Flip::ControllerFilters::ClassMethods

Defined in:
lib/flip/controller_filters.rb

Instance Method Summary collapse

Instance Method Details

#require_feature(key, options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/flip/controller_filters.rb', line 11

def require_feature key, options = {}
  before_action options do
    flip_feature_disabled key unless Flip.on? key
  end
end