views:

1325

answers:

1

I'm beginning to learn Ruby on Rails, and looking at other peoples code. Is there any way to take an exisiting codebase and create object relationship diagrams or Entity relationship diagrams (ERD's) ?

I know Visio can do some things given a database, but I was hoping to produce diagrams of classes, objects and objects.

+8  A: 

You may want to check out Railroad. It takes your Rails project and visualizes it. It can create diagrams based off of your models (based off of has_many, has_and_belongs_to_many, etc), controllers (based on inheritance hierarchy) and state machine diagrams, which I have never used.

But it is pretty cool and does what it is supposed to. It may not have all the flair that Visio has but it is a darn good solution.

vrish88
Railroad didn't work for me with Rails 3, there is however this plugin which works fine: http://github.com/voormedia/rails-erd
rdvdijk