Module: Poirot::AssetHelper

Defined in:
lib/poirot/asset_helper.rb

Instance Method Summary collapse

Instance Method Details

#template_include_tag(*sources) ⇒ Object



3
4
5
6
7
8
# File 'lib/poirot/asset_helper.rb', line 3

def template_include_tag(*sources)
  sources.collect do |source|
    template = File.open(resolve_partial_path(source), "rb")
     :script, template.read.html_safe, :type => "text/mustache", :id => "#{template_name(source).parameterize.dasherize}-template"
  end.join("\n").html_safe
end