Scalate integration for Play Framework
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 20 commits ahead, 1 commit behind tototoshi:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
playapp
plugin/src/main/scala/com/github/tototoshi/play2/scalate
project
.gitignore
.travis.yml
LICENSE.txt
README.md
build.sbt
release.sh

README.md

play-scalate

Build Status

Install

libraryDependencies ++= Seq(
  "org.scalatra.scalate" %% "play-scalate" % "0.4.0",
  "org.scalatra.scalate" %% "scalate-core" % "1.8.0",
  "org.scala-lang" % "scala-compiler" % scalaVersion.value
)

unmanagedResourceDirectories in Compile += baseDirectory.value / "app" / "views"

Usage

package controllers

import javax.inject.{ Inject, Singleton }
import play.api._
import play.api.mvc._
import com.github.tototoshi.play2.scalate._

@Singleton
class Application @Inject() (scalate: Scalate) extends Controller {

  def index = Action { implicit request =>
    Ok(scalate.render("index.jade", Map("message" -> "hello")))
  }

}