Mixing h() helper and plain output in rhtml
Posted on October 22, 2006 - Filed Under RubyOnRails
Sometimes You need to generate output from .rhtml templates with HTML tags escaped mixed with real HTML tags. You can open and close Ruby code tags ( <%= <%=h ) but there is simpler method. In <%= block call h() helper directly. To work You need show correct name space – and this is ERB::Util::h().
Popularity: 4% [?]
Hits for this post: 4961
Similar Posts
- JavaScript templates – Minus Mor plugin
- RuPy 2007 or why Rails still amazes me
- Proper RHTML tags for each loops
- Output to browser in .rhtml templates
- JOE and Rails or how to color RHTML
Comments
Leave a Reply


