skinny-framework/skinny-framework — pull request #102 by gakuzzzz (2014-04-02 16:35:41+00:00)
Title: Make users enable to define original ParamType

I want to define original `ParamType`s. as follows

```scala
class ProgrammersController extends SkinnyResource with ApplicationController {
...snip

override def createParams = Params(params + ("hashedPassword" -> params.as[PlainPassword]("plainPassword").hash("dummy salt")))
override def createForm = validation(createParams,
paramKey("name") is required & maxLength(64),
paramKey("favoriteNumber") is required & numeric,
paramKey("companyId") is numeric,
paramKey("plainPassword") is required & minLength(8)
)
override def createFormStrongParameters = Seq(
"name" -> ParamType.String,
"favoriteNumber" -> ParamType.Long,
"companyId" -> ParamType.Long,
"hashedPassword" -> ProgrammerParamType.HashedPassword
)

private object ProgrammerParamType {
val HashedPassword = ParamType {
case v: HashedPassword => v.value
}
}

```