From: Phlip Date: 2008-08-17T22:11:51+09:00 Subject: Re: writing if statement in one line with elsif condition > @id = case when @recipes.length == i + 1: 0; when i.remainder(2) == 1: > 1; else 2 end > > Although I admit that I'd rather have it on several lines I suspect the original posted might not know you can write a multi-line <% erb %> block! Some sample code puts a different <% %> on each line, like the original post did...