Forum: Ruby on Rails How to generate UML diagrams from existing ruby code?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ms (Guest)
on 2009-05-10 14:31
(Received via mailing list)
Hi,

thanks for reading. Till now, I've used railroad to visualize my
models. But as far as I can see, there's no possibility to add
information about the model class methods. Methods are only added to a
diagram, if you visualize your controllers. Is there a way to change
this behavior?

I've looked out for something else and found 'ruby-uml', seems to
realize what I am looking for, but due to it's real basic
documentation I can't used it. Did you ever use it and can show me an
example?

Thank you for your answers!
ms
Bharat R. (Guest)
on 2009-05-10 17:35
(Received via mailing list)
Take a look at Rubymine from JetBrains.  They generate a really slick
E/R diagram that is quite close to the UML diagrams.
Phlip (Guest)
on 2009-05-10 18:52
(Received via mailing list)
ms wrote:
> Hi,
>
> thanks for reading. Till now, I've used railroad to visualize my
> models. But as far as I can see, there's no possibility to add
> information about the model class methods. Methods are only added to a
> diagram, if you visualize your controllers. Is there a way to change
> this behavior?

Open up Railroad's intermediate DOT format and write on it. There are
also DOT
editors, not that I would trust them.

  http://www.graphviz.org/Documentation/dotguide.pdf  <-- the language
reference

However, why are you doing this? Who will read the diagram? What value
will it
add? At my last Rails gig, we would print out a Railsroad once per big
project,
to see the current models, then we would scribble on it. What's wrong
with that
technique?

--
   Phlip
   http://flea.sourceforge.net/resume.html
ms (Guest)
on 2009-05-12 02:37
(Received via mailing list)
Hey,

thanks for all answers so far.

> What's wrong with that technique?

No, there's nothing wrong with that. I just wanted railroad to also
add the model class methods to the diagram, this is possible just by
editing the DOT data(?) That would be nice, thanks for the hint!

cheers, ms
Phlip (Guest)
on 2009-05-12 02:46
(Received via mailing list)
ms wrote:

> No, there's nothing wrong with that. I just wanted railroad to also
> add the model class methods to the diagram, this is possible just by
> editing the DOT data(?) That would be nice, thanks for the hint!

Unfortunately yes, if you type them all in. Models should have enough
methods
that this tedium will obviate the benefit of automatically generating
the graph.

You might ask Railroad's author...

--
   Phlip
   http://flea.sourceforge.net/resume.html
This topic is locked and can not be replied to.