Module: SmtRails::Mustache
- Defined in:
- lib/smt_rails/mustache.rb
Class Method Summary collapse
Class Method Details
.call(template) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/smt_rails/mustache.rb', line 13 def self.call(template) if template.locals.include?(SmtRails.action_view_key.to_s) || template.locals.include?(SmtRails.action_view_key.to_sym) ::Mustache.template_path = SmtRails.template_base_path "Mustache.render(#{template.source.inspect}, #{SmtRails.action_view_key.to_s}).html_safe" else "#{template.source.inspect}.html_safe" end end |