I installed Action text (Trix Editor) in my Rails Application.
After writing the content,the content is generated along with the html tags. e.g.
"div class="trix-content"> div> This is the content part. br>br> /div>
There is a built in function for this:
content.to_plain_text