Sha256: e084c4f0a20729b2fed9cbdbd65e851160709e3479c7520ed3cc16e4be28a1ff
Contents?: true
Size: 422 Bytes
Versions: 2
Compression:
Stored size: 422 Bytes
Contents
module Poirot module AssetHelper def template_include_tag(*sources) sources.collect do |source| template_path = Rails.root.join('app/views', controller_name, "_#{source}.html.mustache") template = File.open(template_path, "rb") content_tag :script, template.read.html_safe, :type => "text/mustache", :id => "#{source.dasherize}-template" end.join("\n").html_safe end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
poirot-0.0.2 | lib/poirot/asset_helper.rb |
poirot-0.0.1 | lib/poirot/asset_helper.rb |