We currently have a tool on our website that is created by JavaScript. The JavaScript is generated by Ruby via .js.erb and .html.erb files. The problem is that it's proprietary code and we'd like to at least be able to move it to a separate file so it's not directly viewable when using "View Source" and maybe include it in our bundles like a regular .js file.
Is there some way to intercept the rendering and redirect it elsewhere or something?
The closest I've come was this - Rails Javascript compression/minification on respond_to javascript response?
We did have it working server-side but it was too slow for our clients. We're using Rails 3.0