I have a partial (_contact.html) which looks something like this
I want to render this to the view exactly as it is show there. I don’t
want the erb tags evaluating. When I try and render this using:
render :partial => ‘contact.html’
I get an error because it is trying to evaluate the erb tags and call
the name method on the non-existent contact object. I simply want to
render the text, as it is written, to the view. How can I do this?
The reason for it is that I am investigating ways of JSON templating
aiming to make some of my partials reuseable between the rails code and
I want to carry on using <%= %> in the JSON templates. How can I tell
rails just to render the partial as text and not try to evaluate it?