WYSIWYG在視圖中顯示為HTML - Ruby on Rails

In my Post table the field I am attempting to affect is called body. When I use the WYSIWYG editor and save it, the display from the both the index and the show views actually shows the HTML. For instance, if I make something bold in the WYSISWG editor, it will output in the view something and the associated

show, etc.

最佳答案

Perhaps you use h method in views so all your html tags are escaped or you are escaping your tags in controller while saving post