I have a textarea where the users enter a list items in varying formats. This is then inserted to my DB. When I look at the input in the DB the format is the same as the users enters it which is fine. so the input could look like this: ----------------- item1 item2 item3 some text here ----------------- However when I output it, it just outputs as a long string. I have tried using some JS to insert line breaks but my app just prints those out as well. Is there a way to tell my view to format my strings as HTML? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 3 Nov 2007, at 17:42, jimmygoogle wrote:> > ----------------- > However when I output it, it just outputs as a long string. I have > tried using some JS to insert line breaks but my app just prints those > out as well. Is there a way to tell my view to format my strings as > HTML? >Is simple_format what you''re looking for ? Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---