diff --git a/app/assets/javascripts/new_design/application.js b/app/assets/javascripts/new_design/application.js new file mode 100644 index 000000000..700bc74fb --- /dev/null +++ b/app/assets/javascripts/new_design/application.js @@ -0,0 +1,18 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. +// +// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require turbolinks +//= require highcharts +//= require chartkick +//= require_tree . diff --git a/app/views/layouts/new_application.html.haml b/app/views/layouts/new_application.html.haml index b12804452..3e2196589 100644 --- a/app/views/layouts/new_application.html.haml +++ b/app/views/layouts/new_application.html.haml @@ -37,7 +37,7 @@ = render partial: "layouts/mailjet_newsletter" = render partial: "layouts/crisp" - = javascript_include_tag "application", "data-turbolinks-track": true + = javascript_include_tag "new_design/application", "data-turbolinks-track": true = yield :charts_js - if Rails.env == "test" %script{ type: "text/javascript" } diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index c20bc1259..f6ab56d75 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css) +Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css new_design/application.js)