Rails generators reminders

First: use them! Most frameworks have a project boilerplate and that’s it. Rails’ ability to quickly lay down a conventional resource, model, or anything else is a productivity booster. Use it!

Second: experiment with the commands before you run them. Try Harrison Broadbent’s, RAILSG · Ruby on Rails Generator Reference and Command Builder:

RAILSG is a collection of Ruby on Rails generator command references, and command builders.

Third, write your own. When your app gets traction, you’ll probably invent a couple of conventions of your own. Use generators to quickly write new code consistently. Garrett Dimon has become the expert on this, Creating Custom Rails Generators:

Rails generators can help remove significant friction from the process of spinning up new ideas, but you don’t have to limit yourself to the included generators. You can also create custom generators as long as you’re familiar with the available APIs and know where the speed bumps are.

And check out his forthcoming book on the same topic!

Adam Keys @therealadam