From: Douglas Livingstone Date: 2005-04-22T06:39:50+09:00 Subject: for .. in .. else? In my erb templates, I've got this pattern quite often: <% for aSong in songList %> <% end %> <% unless songList.empty? %> <% end %>
Songs<%= aSong.name %>no songs!
Is there any way to write is more like this: <% for aSong in songList %> <% else %> <% end %>
Songs<%= aSong.name %>no songs!
Thanks, Douglas