Sha256: 6d8f5d580fa6fedeccef572e551a1c020ecb70c028ea0c6d544f48255e1ec1f2
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
module Rad module JavascriptHelper def javascript_include_tag *scripts Array(scripts).collect{|script| tag :script, '', src: "#{config && config.url_root!}#{script}", type: "text/javascript" }.join("\n") end def javascript_tag value = nil, &block args = [{type: "text/javascript"}] args.unshift value if value tag :script, *args, &block end # Escape def js obj; obj.to_s.js_escape end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rad_core-0.0.13 | lib/rad/html/helpers/javascript_helper.rb |