Sha256: 04f4357efb5405b74e13d0853fc5494ca106af0ec884d75dce0d0d84b65db60c
Contents?: true
Size: 616 Bytes
Versions: 4
Compression:
Stored size: 616 Bytes
Contents
# encoding: UTF-8 require 'coffee-script' module Spontaneous::Output::Helpers module ScriptHelper extend self def scripts(*args) script_urls(*args).map { |script| script_tag(script) }.join("\n") end def script_urls(*args) options = args.extract_options! options.update(:development => development?) asset_environment.js(args.flatten, options) end alias_method :script, :scripts def script_tag(src) %(<script type="text/javascript" src="#{src}"></script>) end Spontaneous::Output::Helpers.register_helper(self, :html) end end
Version data entries
4 entries across 4 versions & 1 rubygems