diff --git a/config/initializers/deferred_javascripts_helper.rb b/app/helpers/deferred_scripts_helper.rb similarity index 73% rename from config/initializers/deferred_javascripts_helper.rb rename to app/helpers/deferred_scripts_helper.rb index ae4f963cecf..66c42fdd105 100644 --- a/config/initializers/deferred_javascripts_helper.rb +++ b/app/helpers/deferred_scripts_helper.rb @@ -1,7 +1,7 @@ -module DeferredJavascriptsHelper +module DeferredScriptsHelper # Provides a javascript map of the files in the 'defer' directory - def deferred_javascripts + def deferred_scripts files = {} Dir.glob("#{Rails.root}/app/assets/javascripts/defer/*.js").each do |file| @@ -14,7 +14,3 @@ module DeferredJavascriptsHelper end end - -module Sprockets::Rails::Helper - include DeferredJavascriptsHelper -end diff --git a/app/views/common/_discourse_javascript.html.erb b/app/views/common/_discourse_javascript.html.erb index 8b26e916b16..77f0c14c155 100644 --- a/app/views/common/_discourse_javascript.html.erb +++ b/app/views/common/_discourse_javascript.html.erb @@ -1,7 +1,7 @@