Case statement in a view – Fail!
Well I can’t recall when (and why) but one time I was writing a view in a Rails project and needed to write a case statement (of course I could have done it with usual if / else /elsif statement, but the case statement seemed more natural). My first try (and I remember I was pretty confident that this was the way to go) had gone like this: Continue reading