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_asset_overridesObject

Since:

  • 0.7.0



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

def disable_asset_overrides
  Pugin::Feature.disable('AssetOverrides')
end

#disable_global_searchObject

Since:

  • 0.7.0



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

def disable_global_search
  Pugin::Feature.disable('GlobalSearch')
end

#disable_pingdomObject

Since:

  • 0.7.0



35
36
37
# File 'lib/pugin/helpers/controller_helpers.rb', line 35

def disable_pingdom
  Pugin::Feature.disable('Pingdom')
end

#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

#enable_asset_overridesObject

Since:

  • 0.7.0



23
24
25
# File 'lib/pugin/helpers/controller_helpers.rb', line 23

def enable_asset_overrides
  Pugin::Feature.enable('AssetOverrides')
end

#enable_global_searchObject

Since:

  • 0.7.0



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

def enable_global_search
  Pugin::Feature.enable('GlobalSearch')
end

#enable_pingdomObject

Since:

  • 0.7.0



31
32
33
# File 'lib/pugin/helpers/controller_helpers.rb', line 31

def enable_pingdom
  Pugin::Feature.enable('Pingdom')
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

#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



44
45
46
# File 'lib/pugin/helpers/controller_helpers.rb', line 44

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