Mapping Concepts Into Code
summary
Builds a working gem called noticed gem that maps notification concepts into Rails code using ActionMailer, ActiveJob, database records and websockets. Extracts an ordered options wrapper and a small deliver_by object to encapsulate job options, splits Notifier/Event/Notification to avoid 10,000× param duplication, and uses metaprogramming (inherited hook and class_eval) plus single table inheritance to inject per-notifier helpers. Early choices (where database models live and naming collisions) cause pain, but the refactor largely succeeds and enables bulk deliveries.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:39Noti gem for Rails
- 10:05Delivery methods refactored
- 15:23Active Job integration
- 20:19Database deliveries
- 24:12Introducing events
- 28:25Single table inheritance
- 33:00Key takeaways
- 35:47Call to action
related talks
33mYour Bright Metaprogramming Future: Mistakes You'll Make (and How to Fix Them)
29mLet’s refactor some Ruby code
42mFrom Post.create to PostPublished.new
26mMeta-programming for Dummies
32mRuby for Startups
26mMeta-programming for Dummies
25mRefactoring: The ASMR of Programming Talks
36mOpening up to change
