Sha256: 62e993ce00c4e2c973d54b9f3ceaa0ced1e43eabfa495d44c2ba7120a4b7c3c5
Contents?: true
Size: 496 Bytes
Versions: 1
Compression:
Stored size: 496 Bytes
Contents
module CDNJS module ViewHelpers def cdnjs_include_tag(cdn_vars) js_string_output = Array.new cdn_vars.each do |js_file_config| js_string_output << javascript_include_tag("//cdnjs.cloudflare.com/ajax/libs/#{js_file_config['cdnjs']}") js_string_output << javascript_tag("window.jQuery || document.write(unescape('#{asset_path(js_file_config['localpath']).gsub('<','%3C')}'))") end return js_string_output.join("\n").html_safe end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cdnjs-rails-1.0.0 | lib/cdnjs-rails/view_helpers.rb |