I recently made a small rails3 application to convert old cms written in another language. After migrating the content, I am having problems releasing the content from the database.
The @ content.desc field sometimes has html. Currently, the only way to make it work is:
<%= sanitize content.desc %>
But is this the best way? When I use <%=h @content.desc %>, I can see html tags. When I use <%= simple_format @content.desc %>, I get an unholy interval.
Is there a definitive guide somewhere where I can see all the options when releasing content? I tried to search, but I can not do anything (rails newb, I know).
source
share