RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: mtunjic
Superb cast.
For older Rails version:
module MustacheTemplateHandler def self.call(template) if template.extension == "mustache" "Mustache.render(#{template.source.inspect}, object).html_safe" else "#{template.source.inspect}.html_safe" end end end ActionView::Template.register_template_handler(:mustache, MustacheTemplateHandler)
---- View
%ol - @users.each do |user| = render "user", :object => user.attributes.symbolize_keys
Superb cast.
For older Rails version:
---- View