As stated in previous answer, you can only define a single implicit parameter for a function literal, but there is workaround.
Instead of multiple implicit arguments you can write function literal as taking multiple argument lists with one argument each. Then it is possible to mark each argument as implicit. Rewriting original snippet:
def create = authAction { implicit request ? implicit user ?
Ok(html.user.create(registrationForm))
}
You can call it from authAction
as f(request)(user)
.
implicit
keyword duplication is annoying, but at least it works.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…