jacobrubyonrails
jacobrubyonrails

Reputation: 147

Activeadmin - HTML in textarea

I've recently started using the Activeadmin gem for my Ruby on Rails blog. In my post model I have a title:string and body:text. How can I use HTML and css in my active admin textarea so I can divide my text into paragraphs and add styles to my body text?

Thanks in advance!

Upvotes: 3

Views: 1363

Answers (1)

jacobrubyonrails
jacobrubyonrails

Reputation: 147

Found the solution myself. The view accepted HTML and CSS if I just added .html_safe. For example <%= @post.body.html_safe %>. Easiest solution for now.

Upvotes: 1

Related Questions