View that allows HTML

Hi everyone,

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 (http://guides.rubyonrails.org/getting_started.html). 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?

Thanks,

Adam

Hi everyone,

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 (
http://guides.rubyonrails.org/getting_started.html). 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 <http://apidock.com/rails/String/html_safe> on rails
view.
ex : <%= @post.html_safe %>