Sha256: b99ac4e23b3b94fbcea73aadaebe6b11d85057d73fd65e3f79afc704fe9723ad
Contents?: true
Size: 451 Bytes
Versions: 17
Compression:
Stored size: 451 Bytes
Contents
module ErpApp module Widgets class JavascriptLoader def self.glob_javascript files = Rails.application.config.erp_app.widgets.collect{|widget|Dir.glob(File.join(widget[:path],"javascript/*.js"))}.flatten.sort{|file| file <=> file} "<script type='text/javascript'>#{Uglifier.compile(files.collect{|file| IO.read(file)}.join(''))}</script>" end end#JavascriptLoader end#Widgets end#ErpApp
Version data entries
17 entries across 17 versions & 1 rubygems