Sha256: 80093d2ea746d6537bfe0c80d09540763395fbb5cbbcd2fcaa5dd91876f01837
Contents?: true
Size: 424 Bytes
Versions: 17
Compression:
Stored size: 424 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 "<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