Save Time with Custom Rails Generators
summary
Shows how to write Rails generators that actually create files, add routes, run migrations and push matching tests so recurring tasks go from ten-minute to ten-second across a team. Demonstrates generator APIs, Thor usage, template partials, and test harnesses that assert file contents and idempotence, with metrics like 10x fewer manual steps and examples of generators that did and did not survive CI. Covers common speed bumps: naming collisions, idempotent templates, and rollback behavior.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:59Why use custom generators
- 17:57Creating your first generator
- 28:34Generator templates and files
- 37:30Testing generators
- 47:14Advanced generator features
- 56:09Conclusion and Q&A
related talks
26mCrafting Fully Custom Code Generators
37mCreating Mountable Engines
42mPowerful Rails Features You Might Not Know
09m20 Tools and Techniques that Make You More Creative
32mRails Sustainable Productivity
37mDon't touch that!
01h 02mPerformance
38mAll you need is Rails (Engines): Compartmentalising your Monolith
