ERB in JS working, but ugly