Skip to content

Commit 5333e94

Browse files
committed
add docs on format proc
1 parent a383875 commit 5333e94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,9 @@ end
949949

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

952+
The `transform` proc accepts a params hash, as well as optional `controller`
953+
and `schema` keywords. The proc should return the formatted params.
954+
952955
```rb
953956
TypedParams::Formatters.register(:strong_params,
954957
transform: -> (params, controller:) {

0 commit comments

Comments
 (0)