Skip to content

Commit

Permalink
fix docs on format registration
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Feb 28, 2025
1 parent 5333e94 commit 7cccb2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,9 @@ end

You may register custom formatters that can be utilized in your schemas.

The `transform` proc accepts a params hash, as well as optional `controller`
and `schema` keywords. The proc should return the formatted params.
Each format consists of, at minimum, a `transform:` lambda, accepting a params
hash, as well as optional `controller:` and `schema:` keywords, and returning
the formatted params. For more usage examples, see [the default formatters](https://github.com/keygen-sh/typed_params/tree/master/lib/typed_params/formatters).

```rb
TypedParams::Formatters.register(:strong_params,
Expand Down

0 comments on commit 7cccb2b

Please sign in to comment.