I’m brand new to Ruby on Rails. I just went through the tutorial on the Ruby on Rails site which shows how to create a basic blog (Getting Started with Rails — Ruby on Rails Guides). I’m trying to figure out how to adjust the view to allow HTML so that the posts have formatting. As it is now, the html tags are escaped. Is there a simple way to allow unescaped HTML into a view so that I can create a formatted post?
I'm brand new to Ruby on Rails. I just went through the tutorial on the
Ruby on Rails site which shows how to create a basic blog (
Getting Started with Rails — Ruby on Rails Guides). I'm trying to figure
out how to adjust the view to allow HTML so that the posts have formatting.
As it is now, the html tags are escaped. Is there a simple way to allow
unescaped HTML into a view so that I can create a formatted post?
you can use html_safe <APIdock; on rails
view.
ex : <%= @post.html_safe %>