match case in scala template doesn’t work, in play2
I was hitting the same problem. Enclosing the right part of the case in curly braces fixed the issue for me. This works for me: @user match { case Some(user) => { Welcome, @user.username! } case None => { <a href=”https://stackoverflow.com/questions/9748258/@routes.Application.login”>Login</a> } } Without the braces, it gave an error with the space after the … Read more