Skip to content

Instantly share code, notes, and snippets.

@dph01
Created June 13, 2012 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dph01/2922933 to your computer and use it in GitHub Desktop.
Save dph01/2922933 to your computer and use it in GitHub Desktop.
def signupMailBody(user: User, validationLink: String): Elem = {
val templatePath = List("user", "signupmailbody")
val template = Templates.findRawTemplate(templatePath, S.locale)
template.map(t => {
val out = ("#dear" #> user.shortName &
"#validationLink [href]" #> validationLink)(t)
out.head.asInstanceOf[Elem]
}).openOr {
val msg = "template: " + templatePath + " not found"
error(msg)
throw new Exception(msg)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment