Question

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 and objects.

Was it helpful?

Solution

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.

OTHER TIPS

Also Rails ERD is not bad. It is a bit simpler than Railroad but it is still a great project.

Some IDE's have this feature, if I remember rightly RubyMine does.

Rails ERD has excellent documentation and gallery: http://rails-erd.rubyforge.org/gallery.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top