Question

When trying to implement a SecuredAction like this:

def index = SecuredAction {
    Ok(views.html.index())
}

I'm getting a

Overloaded method value [SecuredAction] cannot be applied to (play.api.mvc.SimpleResult[play.api.templates.Html])
Was it helpful?

Solution

Forgot about implicit request =>

So:

def index = SecuredAction { implicit request =>
    Ok(views.html.index())
}

Is correct.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top