I'm doing a little Play application in Scala and I receive this error when I want to open my app:
too many arguments for method apply: (title: String)(content: play.twirl.api.Html)(implicit messages: play.api.i18n.Messages)play.twirl.api.HtmlFormat.Appendable in class main
I don't know what is wrong with my code, here is a quick view of my code:
main.scala.html:
@(title: String )(content: Html)(implicit messages: Messages)
<!DOCTYPE html>
<html>
<head>
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
</head>
Here the viewseleves.scala.html
@(eleves: Seq[Eleve])(implicit flash: Flash, messages: Messages)
@main(messages("title.eleves"), Some("viewEleves")){
<div id="type_ead" class="list">
<fieldset>
<legend>@messages("institutions.list.institutions")</legend>
A screen of the error:
On this line:
@main(messages("title.eleves"), Some("viewEleves"))
you've passed two arguments to the main function created by your template, but it should only take one, a String
called title
.