Creating your own generators in rails.

In this article I will show how to create a generator that generates the code from my previous article about basic user authentication in rails.

Rails generators are used to automatically generate code. You probably already use them to generate controllers, models and migrations. Every time you call script/generate you’re using a generator. However it’s easy to create your own generator in rails. If you find yourself copying code between applications you may find it useful to create a generator to generate the code for you.  read more »