The Boring Bits Bite Back
summary
A Rails pet‑care app called ptrax Rails app grows from simple owner/caretaker checks to dozens of ad‑hoc role conditionals, a policy refactor that briefly tidies controllers, then a customer demand for custom roles that triggers a 6–12 months rewrite and loses an enterprise deal. Concrete fixes: store roles via join tables, avoid sprawling policy methods in favor of a centralized permission model (example gem: CanCanCan), and keep actions CRUD‑ish so permissions stay readable and editable.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:05Why authorization matters
- 3:12Building Ptrax app
- 7:52Policy authorization pattern
- 13:48Enterprise customer demands
- 14:51Three proposals for better design
- 20:31Key takeaways and advice
related talks
41mAPPLICATION ARCHITECTURE: BOUNDARIES, OBJECT ROLES, & PATTERNS
35mRails vs. Object Oriented Design
31mPanel Discussion
36m"Business Logic in Ruby"
35mWrangling Large Rails Codebases
34m"Taming your Rails monolith"
43mThe Clean Architecture: How to Grow From Startup to Enterprise
32mBuilding HUGE Web Apps: Rails at 1,000,000 Lines of Code
