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
Instance Method Summary collapse
- #disable_status_banner ⇒ Object
- #disable_top_navigation ⇒ Object
- #enable_status_banner ⇒ Object
- #enable_top_navigation ⇒ Object
-
#reset_bandiera_features ⇒ Object
This will reset the built in Bandiera feature cache for Pugin.
Instance Method Details
#disable_status_banner ⇒ Object
11 12 13 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 11 def Pugin::Feature.disable('StatusBanner') end |
#disable_top_navigation ⇒ Object
19 20 21 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 19 def Pugin::Feature.disable('TopNavigation') end |
#enable_status_banner ⇒ Object
7 8 9 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 7 def Pugin::Feature.enable('StatusBanner') end |
#enable_top_navigation ⇒ Object
15 16 17 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 15 def Pugin::Feature.enable('TopNavigation') end |
#reset_bandiera_features ⇒ Object
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.
28 29 30 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 28 def reset_bandiera_features Pugin::Feature::Bandiera.reset end |