Module: Ideasbugs::WidgetHelper

Defined in:
app/helpers/ideasbugs/widget_helper.rb

Overview

Included into the host's ActionView. Drop <%= ideasbugs_tag %> before in your layout; it renders nothing unless feedback is enabled for the request.

Instance Method Summary collapse

Instance Method Details

#ideasbugs_tagObject



8
9
10
11
12
13
14
15
16
# File 'app/helpers/ideasbugs/widget_helper.rb', line 8

def ideasbugs_tag
  return unless Ideasbugs.enabled?(request)

  Widget.snippet(
    endpoint: Ideasbugs.config.feedbacks_endpoint,
    locale: I18n.locale,
    nonce: (content_security_policy_nonce if respond_to?(:content_security_policy_nonce))
  ).html_safe
end