Hi, I just completed the first version of an application. I now find
that subsequent version require me to do pretty much the same thing all
over again but for different types of things.
For example, I need to:
- Create a new model (say foo) and a set of related migrations
- Add a bunch of ‘belongs_to’ statements to the new model
- Add ‘has_many foo’ to a couple of other models
- Create a controller and a set of views for displaying the data in foo
(like scaffold) - Add a before_filter to this controller
- Create a link to the index page of this controller in my main layout
- Modify the create method in this controller to create the links
between the foreign keys - Create a POST string to pass data to this controller (to be used by
another program) - …and so on.
Normally, I would write that list up and go about doing it a step at a
time. However, when it comes to Rails, I feel lazy :-S
It seems that the DRY way is to use a generator. Is there a good
tutorial that I could follow?
Thanks,
Mohit.