When I write
module ApplicationHelper
def flash_helper
flash.each do |key, msg|
content_tag :div, msg, :class => key
## "<div class=\"key\">" + msg + "</div>"
end
end
end
I do not get anything unless I return
the statement. The HTML is escaped in my view when I call <%= flash_helper %>
. What gives? How can I prevent the HTML from being escaped?