~/talk

Do You Need That Validation? Let Me Call You Back About It

Talkat Ruby on Ice 2019 · 2019-02-22..02-24· [ruby-on-rails, frontend-architecture]
slides:none on file

Shows that before_validation callbacks cause hidden bugs (example: auto-setting event datetimes that broke tests) and huge test/setup cost (one case forces creating ~23 rows). Examines concrete alternatives: plain ActiveModel form objects with explicit save flow, the active_type inheritance trick, Elixir-style change sets (used in Phoenix) that tie allowed params to validations, and Trailblazer/Reform + dry-validation operations. Demonstrates what gets built, why callbacks run unexpectedly, and why change sets or scoped validators often work better.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03The problem with callbacks
  3. 5:51Validations and complexity
  4. 12:45Affordances in design
  5. 20:33Existing rails solutions
  6. 24:11Form objects
  7. 26:22Inheritance-based approach
  8. 28:21Change sets
  9. 33:23Operations and validators
  10. 38:13Conclusion and takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.