Templating language for both Ruby and client-side JS
Is there a templating language that has both server-side ruby (pref. rails) and JS renderer?
Here is why this would be useful: Consider you want to display a big list of songs. You render the first 50 and a "show more" button.
The simple solution is to return a rendered piece of HTML from the server, but consider how nice would it be songs were returned as JSON and then were rendered using the same template on the client side.
It is Ruby based but there are several different implementations, including JS.