Skip to content

Instantly share code, notes, and snippets.

@ryantanner
Created January 27, 2013 19:05
Show Gist options
  • Save ryantanner/4649821 to your computer and use it in GitHub Desktop.
Save ryantanner/4649821 to your computer and use it in GitHub Desktop.
implicit val permissionTypeMapper = MappedTypeMapper.base[Permission, String](
p => p match {
case Administrator => "Administrator"
case NormalUser => "NormalUser"
},
s => s match {
case "Administrator" => Administrator
case "NormalUser" => NormalUser
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment