Created
June 29, 2013 17:48
-
-
Save engie/5892024 to your computer and use it in GitHub Desktop.
Scala auto-formatting going wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 />" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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