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.11.1
-
source
- 0.11.1 source October 18, 2026 (229 KB)
-
-
0.11.0
-
source
- 0.11.0 source October 05, 2026 (199 KB)
-
-
0.10.0
-
source
- 0.10.0 source September 29, 2026 (181 KB)
-
-
0.9.0
-
source
- 0.9.0 source September 27, 2026 (176 KB)
-
-
0.8.0
-
source
- 0.8.0 source September 19, 2026 (81.5 KB)
-
-
0.6.0
-
source
- 0.6.0 source September 07, 2026 (59.5 KB)
-