ruby on rails – Maintaining page breaks – Education Career Blog

In my Rails app, I have a lot of data that is declared as text in the migration file. But when I print these attributes/fields out in the view, all the line breaks are lost and I get one large chunk of text. How do I maintain the line breaks?

,

This is an HTML problem. Its rules state that consecutive whitespace is converted to a single space.

Rails has a simple_format function that wraps blocks of text in

tags so you get the separation you want

Leave a Comment