Skip to content

Instantly share code, notes, and snippets.

View divarvel's full-sized avatar

Clément Delafargue divarvel

View GitHub Profile
@divarvel
divarvel / gist:1621772
Created January 16, 2012 16:56
Mongo DB ObjectId request matching
object Oid {
def unapply(s: String): Option[ObjectId] = {
if(ObjectId.isValid(s)) Some(new ObjectId(s))
else None
}
}
def intent = {