Is there a way to write a case statement in Slim for the following example. I made some changes for the StackOverflow question: How to write a switch statement in Ruby
case a
when 1..5
= "It's between 1 and 5"
when 6
= "It's 6"
when String
= "You passed a string"
else
= "You gave me #{a} -- I have no idea what to do with that."
end
I tried the following but generates an error.
= case @taxon.name
= when "Wedding Cakes"
div.taxon-descripiton Wedding Cake Description
This is what I am told
... syntax error, unexpected tIVAR, expecting keyword_when
; @output_buffer.safe_concat(("<when>\"Weddin...