尝试使用securesocial保护控制器方法时出错

时间:2013-06-25 09:13:36

标签: scala playframework playframework-2.1 securesocial

尝试实施这样的SecuredAction时:

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

我得到了

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

1 个答案:

答案 0 :(得分:0)

忘记了implicit request =>

所以:

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

是对的。