Don't Rewrite Your Framework
summary
Shows concrete Rails features and how they replace hand‑rolled hacks: use context validations to run different rules per step, map address fields to a Value Object via composite to get Address#== working, wire after_add/after_remove to keep a cart total in sync (example works), process records with find_in_batches (default batch size 1,000) and split 200 ids across two workers, prevent races with lock_version optimistic locking or FOR UPDATE inside a transaction, and use Rails 7.1 normalize for standardized attributes.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:39Validating fields with context
- 5:09Value objects for data
- 7:38Side effects with callbacks
- 9:28Efficient batch processing
- 12:22Concurrent access with locking
- 16:04Rails 7.1 value normalization
- 17:30Reusable behavior with modules
- 18:13Observing app behavior
- 20:01Code logic with string inquiry
- 21:26Sharing data with current attributes
- 22:07Transforming names with inflector
- 23:30Splitting routes with draw
- 24:35Custom routes with constraints
- 25:18Conclusion
related talks
42mPowerful Rails Features You Might Not Know
40mTricks That Rails Didn't Tell You About
39mExploring Rails anti-patterns
01h 47mWorkshop - Applications First, Frameworks Second: Better Systems through Design
38mRails hurts, because you're using it wrong. Let's fix that
33mSo You Want to Start Refactoring?
41mOff the Tracks - Challenging the Rails Mindset
32mRails Sustainable Productivity
