Search code examples
sqlruby-on-railstextareatext-formatting

Maintaining user's formatting in Text Area


I am wrting a Rails app. One part of the app takes a user's input from a textarea, sticks that into a database, and then renders it on another page. How do I make sure that the user's carrige returns and other text formatting are maintained through this process?


Solution

  • Check out the sanitize and simple_format methods (you can use them together)