dot.rake
[Update: 10/15/07 - incorporated changes by David Vrensk (and a few more from me). Now it merges in associations into the arc, and also deals with inheritance (e.g. STI).]
While googling for articles on Rails associations, I happened upon this gem of a script by Matt Biddulph. I loved it so much I made it a rake task! Once you install GraphViz like this:
sudo port install graphviz
and put dot.rake in your lib/tasks directory, then running this:
rake dot
produces diagrams like this:

And you can also import the DOT source into OmniGraffle for further editing, like this:
open -a "OmniGraffle" model.dot







