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_asset_overrides ⇒ Object
- #disable_global_search ⇒ Object
- #disable_pingdom ⇒ Object
- #disable_status_banner ⇒ Object
- #enable_asset_overrides ⇒ Object
- #enable_global_search ⇒ Object
- #enable_pingdom ⇒ Object
- #enable_status_banner ⇒ Object
-
#reset_bandiera_features ⇒ Object
This will reset the built in Bandiera feature cache for Pugin.
Instance Method Details
#disable_asset_overrides ⇒ Object
27 28 29 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 27 def disable_asset_overrides Pugin::Feature.disable('AssetOverrides') end |
#disable_global_search ⇒ Object
19 20 21 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 19 def disable_global_search Pugin::Feature.disable('GlobalSearch') end |
#disable_pingdom ⇒ Object
35 36 37 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 35 def disable_pingdom Pugin::Feature.disable('Pingdom') end |
#disable_status_banner ⇒ Object
11 12 13 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 11 def Pugin::Feature.disable('StatusBanner') end |
#enable_asset_overrides ⇒ Object
23 24 25 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 23 def enable_asset_overrides Pugin::Feature.enable('AssetOverrides') end |
#enable_global_search ⇒ Object
15 16 17 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 15 def enable_global_search Pugin::Feature.enable('GlobalSearch') end |
#enable_pingdom ⇒ Object
31 32 33 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 31 def enable_pingdom Pugin::Feature.enable('Pingdom') end |
#enable_status_banner ⇒ Object
7 8 9 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 7 def Pugin::Feature.enable('StatusBanner') 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.
44 45 46 |
# File 'lib/pugin/helpers/controller_helpers.rb', line 44 def reset_bandiera_features Pugin::Feature::Bandiera.reset end |