Strong parameters answer only which keys may pass. A Permittable contract also says what each field should be: it casts the value to a declared type, validates bounds and formats, applies defaults, and renders every failure as a 422 that names the offending parameter. Because a contract is class-level data rather than code inside the action, it can also be checked against the database when the controller loads, so a column dropped by a migration fails the deploy instead of the request. activesupport is the only runtime dependency.
Required Ruby Version
>= 3.2.0
Authors
Ethan Nguyen
Versions
-
0.16.0
-
source
- 0.16.0 source November 15, 2026 (293 KB)
-
-
0.15.1
-
source
- 0.15.1 source November 12, 2026 (284 KB)
-
-
0.15.0
-
source
- 0.15.0 source November 11, 2026 (283 KB)
-
-
0.14.0
-
source
- 0.14.0 source November 09, 2026 (272 KB)
-
-
0.13.1
-
source
- 0.13.1 source November 04, 2026 (259 KB)
-