diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-03 23:31:53 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-03 23:31:53 +0300 |
commit | dab08be606878139ce3fe3d8e197ef73badf8e88 (patch) | |
tree | 7693b5595ed61943879eec4bb4ee71dff75af3c0 /app/helpers/defer_script_tag_helper.rb | |
parent | db271a6b051f9630d5dfb3acbbd78f150cb3f23f (diff) |
Resolve "Specific Async Script Loading by using a Page Variable"
Diffstat (limited to 'app/helpers/defer_script_tag_helper.rb')
-rw-r--r-- | app/helpers/defer_script_tag_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/defer_script_tag_helper.rb b/app/helpers/defer_script_tag_helper.rb new file mode 100644 index 00000000000..e1567556e5e --- /dev/null +++ b/app/helpers/defer_script_tag_helper.rb @@ -0,0 +1,6 @@ +module DeferScriptTagHelper + # Override the default ActionView `javascript_include_tag` helper to support page specific deferred loading + def javascript_include_tag(*sources) + super(*sources, defer: true) + end +end |