Use compiled hogan.js (mustache) JavaScript templates with sprockets and the Rails asset pipeline.
Les Hill
k.A.