|
Posted by Neelkanth Ram on September 12th, 2009
In Rails view, if you want to retain and display newline characters that was entered by the user in text area, then the simple solution to use simple_format . If you use <%= @profile.description %> , then the carriage returns gets discarded. Text entered by user in a textarea field: Output shown as single block sentences without any wrapper. Output when the ActionView helper method simple_format is used: Unique Views: 456 Total views: 615 Follow responses at RSS 2.0. Leave a response | Trackback. Leave a Reply |