Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created May 26, 2016 06:14
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 anonymous/c09bb2fb956312eebc70a3525b5552f2 to your computer and use it in GitHub Desktop.
Save anonymous/c09bb2fb956312eebc70a3525b5552f2 to your computer and use it in GitHub Desktop.
the description for this gist
implicit def userIDBindable(implicit intBinder: PathBindable[Int]) = new PathBindable[UserID] {
override def bind(key: String, value: String): Either[String, UserID] = intBinder.bind(key, value).right.map(UserID)
override def unbind(key: String, value: UserID): String = intBinder.unbind(key, value.value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment