Module: Pugin::Helpers::ControllerHelpers

Defined in:
lib/pugin/helpers/controller_helpers.rb

Overview

A set of controller methods that can be used to enable and disable Pugin features

Since:

  • 0.7.0

Instance Method Summary collapse

Instance Method Details

#disable_status_bannerObject

Since:

  • 0.7.0



11
12
13
# File 'lib/pugin/helpers/controller_helpers.rb', line 11

def disable_status_banner
  Pugin::Feature.disable('StatusBanner')
end

#disable_top_navigationObject

Since:

  • 0.7.0



19
20
21
# File 'lib/pugin/helpers/controller_helpers.rb', line 19

def disable_top_navigation
  Pugin::Feature.disable('TopNavigation')
end

#enable_status_bannerObject

Since:

  • 0.7.0



7
8
9
# File 'lib/pugin/helpers/controller_helpers.rb', line 7

def enable_status_banner
  Pugin::Feature.enable('StatusBanner')
end

#enable_top_navigationObject

Since:

  • 0.7.0



15
16
17
# File 'lib/pugin/helpers/controller_helpers.rb', line 15

def enable_top_navigation
  Pugin::Feature.enable('TopNavigation')
end

#reset_bandiera_featuresObject

This will reset the built in Bandiera feature cache for Pugin.

Use this when you want to get the latest flag values from Bandiera.

If you don’t reset the values will persist across page loads.

Since:

  • 0.7.0



28
29
30
# File 'lib/pugin/helpers/controller_helpers.rb', line 28

def reset_bandiera_features
  Pugin::Feature::Bandiera.reset
end