On Fri, Mar 17, 2017 at 12:35 PM, Adam <[email protected]> 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 <http://apidock.com/rails/String/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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/rubyonrails-talk/2fc060cd-9d9d-497e-94d8-
> 6dfd5fd6ee7a%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/2fc060cd-9d9d-497e-94d8-6dfd5fd6ee7a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Mou Dareka no, tame janakutte
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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to