Capture the Chartkick JS and yield it in the layout
So that we can include all the JS at the bottom of the page without error
This commit is contained in:
parent
62a73e072b
commit
627ce150a7
2 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@
|
|||
= render partial: "layouts/mailjet_newsletter"
|
||||
|
||||
= javascript_include_tag "application", "data-turbolinks-track" => true
|
||||
= yield :charts_js
|
||||
- if Rails.env == "test"
|
||||
%script{ :type => "text/javascript" }
|
||||
(typeof jQuery !== "undefined") && (jQuery.fx.off = true);
|
||||
|
|
1
config/initializers/chartkick.rb
Normal file
1
config/initializers/chartkick.rb
Normal file
|
@ -0,0 +1 @@
|
|||
Chartkick.options[:content_for] = :charts_js
|
Loading…
Add table
Reference in a new issue