who i show in .rhtml my text “ Hellow! ” bold ?
//Controller … @message = “ Hellow! ”
… //view … <%= @message %> …
result: Hellow!
i would like Hellow!
who i show in .rhtml my text “ Hellow! ” bold ?
//Controller … @message = “ Hellow! ”
… //view … <%= @message %> …
result: Hellow!
i would like Hellow!
Next time choose a better subject then "help!". It's not describtive about your problem. Most people won't read it.
//Controller ... @message = "Hellow!"
... //view ... <%= "<br>#{@message}</b>" %>
it forgives ,
the message is dinamic. the message comes of the data base with tags.
Italo Matos wrote:
the message is dinamic. the message comes of the data base with tags.
Try these two experiments in your rhtml:
<%= '<strong> yo </strong>' %>
<%=h '<strong> yo </strong>' %>
The first should be bold, and the second should show <strong> etc in your browser.
The h escapes < to <. Without it, you should get raw HTML.
Now check your database - does it reeeally have < > in it? or < >?
Italo Matos wrote:
the problem is interpret html tag <b></b> <a href=""></a> etc
Please write complete posts with more details.