How does one NOT html_encode a variable in rails?
Posted
by deadkarma
on Stack Overflow
See other posts from Stack Overflow
or by deadkarma
Published on 2010-03-30T01:57:24Z
Indexed on
2010/03/30
2:03 UTC
Read the original article
Hit count: 273
ruby-on-rails
With Rails, If I have a variable with HTML content, how do I output it, unencoded in my view file?
This code, for example:
<% my_variable = "<b>Some Bolded Text</b>" %>
<%= my_variable %>
Outputs:
<b>Some Bolded Text</b>
© Stack Overflow or respective owner