Sha256: 98cc43477f58e06e17c8e1270b1a39bbf970602ab7a4ec70a0ad6d401d294f9d

Contents?: true

Size: 1.18 KB

Versions: 15

Compression:

Stored size: 1.18 KB

Contents

module Pugin
  module Helpers
    # A set of controller methods that can be used to enable and disable Pugin features
    #
    # @since 0.7.0
    module ControllerHelpers
      def enable_status_banner
        Pugin::Feature.enable('StatusBanner')
      end

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

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

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

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

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

      def enable_pingdom
        Pugin::Feature.enable('Pingdom')
      end

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

      # 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.
      def reset_bandiera_features
        Pugin::Feature::Bandiera.reset
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pugin-1.10.10 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.9 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.8 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.7 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.6 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.5 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.4 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.3 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.2 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.1 lib/pugin/helpers/controller_helpers.rb
pugin-1.10.0 lib/pugin/helpers/controller_helpers.rb
pugin-1.9.7 lib/pugin/helpers/controller_helpers.rb
pugin-1.9.6 lib/pugin/helpers/controller_helpers.rb
pugin-1.9.5 lib/pugin/helpers/controller_helpers.rb
pugin-1.9.4 lib/pugin/helpers/controller_helpers.rb