Sha256: fb7f53da558e2d2409b44160ac3006385ca5f23bf3187d6470de1d56432fc0d6

Contents?: true

Size: 438 Bytes

Versions: 1

Compression:

Stored size: 438 Bytes

Contents

module BugHerdHelper

  def bugherd_tag(options = {})
    javascript_tag "
      var BugHerdConfig = #{options.to_json};
      (function (d, t) {
        var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
        bh.type = 'text/javascript';
        bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{BugHerd.configuration.project_key}';
        s.parentNode.insertBefore(bh, s);
      })(document, 'script');
    "
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bugherd-0.0.2 lib/bugherd/helpers/bugherd_helper.rb