Skip to content
Snippets Groups Projects

Resolve "Specific Async Script Loading by using a Page Variable"

1 file
+ 2
3
Compare changes
  • Side-by-side
  • Inline
@@ -2,10 +2,9 @@ module DeferScriptTagHelper
# Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading
def javascript_include_tag(*sources)
if @page_defer_javascript
#options[:defer] = "defer"
super *sources, defer: true
super(*sources, defer: true)
else
super *sources
super(*sources)
end
end
end
Loading