The answer is no longer correct. Rails 3 automatically starts html for you, so when you have a controller:
@error = "<h1>OMG u broke teh intertubez!!111</h1>"
This will output the HTML without escaping:
<%= raw @error %>
And both of these will result in HTML:
<%= h @error %> <%= @error %>
iblue
source share