>>642
value を定義したら >>638 のままで動いたよ。rails4。
ただ html_safe しないとエスケープされた。
<% value = true %>
<%="<div class='hoge'>Hoge</div>".html_safe if value %>