Tuesday, 6 August 2013

How to do html_safe on yield in sinatra?

How to do html_safe on yield in sinatra?

Currently, I am practicing a Sinatra app. I am using slim for views.
In my app/views/layout.slim i have
h1 Sinatra App
= yield
In my app/views/index.slim file i have
h3 Index page
When i go to index route, it shows <h3>Index Page</h3> as a string. Is
there a way that i can i do html_safe on yield ?
I have tried watching this
http://screencasts.org/episodes/introduction-to-sinatra but still not able
to figure out

No comments:

Post a Comment