Ruby case statements in ERB | March 14th, 2008
Fail spectacularly if you happen to indent incorrectly (but not intuitively). Thankfully, Jamis Buck points out a simple solution on the Ruby mailing list:
<% case number
when 1 %>
one
<% when 2 %>
two
<% else %>
something else
<% end %>
Thank you Jamis!