On Feb 19, 2007, at 10:30 AM, libsfan01 wrote:
>
> hi all
>
> my view outputs data from mysql. in mysql and in the source code there
> are linebreaks, but the view does not render them? can anyone tell me
> what i''m doing wrong?
>
> heres my code:
>
> <p><%=h field.send("message") %></p>
Linebreaks are rendered as spaces in HTML. Use
<%= simple_format(h(field.send("message"))) %>
-- fxn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---