Sha256: 7d6e512992e8dfd9e840a82b30dea44f85dd4f0dc7a18c07f3406425631407f8

Contents?: true

Size: 561 Bytes

Versions: 77

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This module includes helpers to manage view hooks in layout
  module ViewHooksHelper
    # Public: Renders all hooks registered as `hook_name`.
    #
    #   Note: We're passing a deep copy of the view context to allow
    #   us to extend it without polluting the original view context
    #
    # @param hook_name [Symbol] representing the name of the hook.
    #
    # @return [String] an HTML safe String
    def render_hook(hook_name)
      Decidim.view_hooks.render(hook_name, deep_dup)
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.8 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.7 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.6 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.10 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.9 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.5 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.8 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.4 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.3 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.7 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.5 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.2 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.1 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.4 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.0 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.3 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.0.rc2 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.27.0.rc1 app/helpers/decidim/view_hooks_helper.rb
decidim-core-0.26.2 app/helpers/decidim/view_hooks_helper.rb