I have the following code in a Rails 3.2.1 helper that keeps escaping HTML even if i don't want it, and i can't figure out how to turn off the html escaping on this method (calling raw or html_safe doesn't work):
module OffersHelper
def price_tag(amount)
amount = amount.to_f
floor = amount.floor
cents = ((amount - amount.floor) * 100).to_i
content_tag(:h2) do
html = floor.to_s
html << content_tag(:sup, cents) if cents > 0
html
end
end
end
If i remove the nested content_tag (the sup tag), the html escaping is turned off...
raw/html_safe? And how you're rendering the string?