keygen-sh/typed_params
View on GitHub ↗ ★ 141 Ruby
An alternative to Rails strong_parameters. Define structured and strongly-typed parameter schemas for your Rails controllers.
4 mentions on Hacker News by 1 person: 2 stories, 2 comments · first 2023-06-07 · latest 2023-10-20
20082026
-
…I envy Elixir in many ways), but I absolutely utilize pattern matching in my Ruby code bases: - https://github.com/keygen-sh/typed_params/blob/4e4982b7d2b26... - https://github.com/keygen-sh/typed_params/blob/4e4982b7d2b26... -…
comment by ezekg · 2023-10-20 · in Useless Ruby sugar: Pattern matching -
It's possible via a custom validation. I just added a test for that to showcase how: https://github.com/keygen-sh/typed_params/commit/e56fe479f26...
comment by ezekg · 2023-07-05 · in Show HN: typed_params – An alternative to strong_parameters for Ruby on Rails