Ruby on Rails
Friday, March 17, 2017
On Fri, Mar 17, 2017 at 12:35 PM, Adam <adamtinsley@outlook.com> wrote:
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 on rails view.
ex : <%= @post.html_safe %>
--Thanks,Adam
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com .
To post to this group, send email to rubyonrails-talk@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .2fc060cd-9d9d-497e-94d8- 6dfd5fd6ee7a%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
Mou Dareka no, tame janakutte
Jibun no Tame ni Warette Iru
( Aqua Timez - Alones )
Jibun no Tame ni Warette Iru
( Aqua Timez - Alones )
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CANryp8%3DsuNvziTEqH-W%2BZedhui0Auf%2BOmKS9eMy%2BjAGd1g7L4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment