Module: Decidim::ViewHooksHelper

Included in:
ProfileSidebarCell
Defined in:
app/helpers/decidim/view_hooks_helper.rb

Overview

This module includes helpers to manage view hooks in layout

Instance Method Summary collapse

Instance Method Details

#render_hook(hook_name) ⇒ String

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

Parameters:

  • hook_name (Symbol)

    representing the name of the hook.

Returns:

  • (String)

    an HTML safe String



14
15
16
# File 'app/helpers/decidim/view_hooks_helper.rb', line 14

def render_hook(hook_name)
  Decidim.view_hooks.render(hook_name, deep_dup)
end