Module: ArRollout::Controller::Helpers

Defined in:
lib/ar_rollout/helper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


4
5
6
7
# File 'lib/ar_rollout/helper.rb', line 4

def self.included(base)
  base.send :helper_method, :rollout?
  base.send :helper_method, :degrade_feature?
end

Instance Method Details

#degrade_feature?(name) ⇒ Boolean


14
15
16
# File 'lib/ar_rollout/helper.rb', line 14

def degrade_feature?(name)
  ArRollout.degrade_feature?(name)
end

#rollout?(name) ⇒ Boolean


9
10
11
12
# File 'lib/ar_rollout/helper.rb', line 9

def rollout?(name)
  return false unless current_user
  ArRollout.active?(name, current_user)
end