Skip to content

Instantly share code, notes, and snippets.

@engie
Created June 29, 2013 17:48
Show Gist options
  • Save engie/5892024 to your computer and use it in GitHub Desktop.
Save engie/5892024 to your computer and use it in GitHub Desktop.
Scala auto-formatting going wrong.
trait FrontendRoutes extends ScalatraServlet with ScalateSupport {
val db: Database
get("/") {
contentType="text/html"
ssp("/index")
}
get("/matches") {
db withSession {
val q3 = for {
c <- Matches
} yield (c.winner.asColumnOf[String], c.loser.asColumnOf[String])
contentType = "text/html"
q3.list.map { case (s1, s2) => " " + s1 + " beats " + s2 } mkString "<br />"
}
}
}
trait FrontendRoutes extends ScalatraServlet with ScalateSupport {
val db: Database
get("/") {
contentType="text/html"
ssp("/index")
}
get("/matches") {
db withSession {
val q3 = for {
c <- Matches
} yield (c.winner.asColumnOf[String], c.loser.asColumnOf[String])
contentType = "text/html"
q3.list.map { case (s1, s2) => " " + s1 + " beats " + s2 } mkString "<br />"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment