I'm generating some js output for each user using a template named example.js.erb
. This is basically a javascript file where I have to put in the user's unique details. I'm using this inside of a widget for the user.
Is there any way to minify the js as it's being rendered? Right now the javascript is being rendered correctly, but it's in it's long form and I'd like to minify the output in order to reduce file size and increase download speed.