New Generator: hasmanythrough

To the aide of anyone whose had to create new models, migrations and
unit tests for the common many-to-many relationship, using “has_many
:through” (that’s almost everyone).

I’ve created a new generator that generates two model classes, plus a
many-to-many relationship class, e.g. User, Group, plus the Membership
model between them. It also generates the migrations and a set of unit
tests.

I’ve tried to write this all up here:
http://hasmanythrough.rubyforge.org/

Let me know if this is useful and/or what can be improved (and what
extra unit tests can be added).

Cheers
Dr Nic

Another way to thing about this generator is: Instant CRUD.

It came about after DHH’s CRUD presentation at railsconf, and his
answers at: http://www.loudthinking.com/arc/000593.html

Another way to think about this generator is: Instant CRUD.

It came about after DHH’s CRUD presentation at railsconf, and his
answers at: http://www.loudthinking.com/arc/000593.html