How to make rails parse <p>, <b>, <strong> entered in text area?

Hello, I have this simple blog Post, I just want to jazz it up a bit
with paragraphs, and bold faces, thought that wasn’t too much to ask
for. But when I enter the following in the text area

<strong>You won't believe this!!</strong>

and save submit it, and then display it in the show action, wherein I

<%= @article.body %>

it displays exactly the same

<strong>You won't believe this!!</strong>

I know about the “h” method and take care not to include it. – I
haven’t done anything else with the app, I just generated the app and
rake db:migrate’d it and nothing else. So it is a clean start. now,
can anyone hint me what I might need to do in addition to not include
the “h” as in <%=h … %> so to display html and etc?


What version of Rails are you using? I seem to remember discussion of
auto-escaping by default in v3, but to my knowledge and testing this
is not the case as of 2.3.4.

Check to make sure that your data is not html-escaped in the database.

Hi Jemminger, I am using 2.3.2

oh yes and the database is mysql that comes with instantrails 2.0

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs