Skip to content

Instantly share code, notes, and snippets.

View nicmarti's full-sized avatar

Nicolas Martignole nicmarti

View GitHub Profile
@nicmarti
nicmarti / gist:1140203
Created August 11, 2011 17:11
Loading an image from the database with play! scala
/**
* Loads the specified documentInstance, the current authenticated user is retrieved
* to check that it's the document owner.
* Play! Framework with latest Scala module.
* Nicolas Martignole - 09/08/2011
*/
def loadImage(di:Option[Long]) = {
import play.utils.Scala.MayErr._
val result=(