I have some simple erb code in one of my views in a rails project.
<%= comment.body %>
I'd like the html tags in the comment.body to be preserved as they have formatting information. I've verified that the text is saved in the database properly like
<b>hello</b>
However it turns out on the page to be <b>hello</b>
not hello as I expect.
How could this be? I'm not using <%= h
to escape the html code.
How do I make it not escaping? I'm using rails 3. Does this matter?