I almost threw myself out the window after seeing that hard-coded HTML in a JavaScript string. How is that maintainable or even nice to look at? It's not.
Am I crazy? What is the benefit of this? With a bit of customization rails could do this out of the box without a duplicate MVC arch.