You should also have a default case for a case statement which raises a RuntimeError or an ArgumentError explaining why the proper template binding couldn't be chosen. Else you'll have a nil value assigned to template_binding and the bug will be more difficult to track down.