Create Graphviz-based diagrams based on the domain model. For easy command line graph generation, you can use:
% rake erd
Options
The following options are supported:
| filename: | The file basename of the generated diagram. Defaults to ERD, or any other extension based on the file type. |
| filetype: | The file type of the generated diagram. Defaults to pdf, which is the recommended format. Other formats may render significantly worse than a PDF file. The available formats depend on your installation of Graphviz. |
| notation: | The cardinality notation to be used. Can be :simple or :bachman. Refer to README.rdoc or to the examples on the project homepage for more information and examples. |
| orientation: | The direction of the hierarchy of entities. Either :horizontal or :vertical. Defaults to horizontal. The orientation of the PDF that is generated depends on the amount of hierarchy in your models. |
| title: | The title to add at the top of the diagram. Defaults to "YourApplication domain model". |
Classes and Modules
Module RailsERD::Diagram::Graphviz::BachmanModule RailsERD::Diagram::Graphviz::Simple
Module RailsERD::Diagram::Graphviz::Uml
Constants
| GRAPH_ATTRIBUTES | = | { :rankdir => :LR, :ranksep => 0.5, :nodesep => 0.4, :pad => "0.4,0.4", :margin => "0,0", :concentrate => true, :labelloc => :t, :fontsize => 13, :fontname => "Arial Bold" } | Default graph attributes. | |
| NODE_ATTRIBUTES | = | { :shape => "Mrecord", :fontsize => 10, :fontname => "Arial", :margin => "0.07,0.05", :penwidth => 1.0 } | Default node attributes. | |
| EDGE_ATTRIBUTES | = | { :fontname => "Arial", :fontsize => 8, :dir => :both, :arrowsize => 0.9, :penwidth => 1.0, :labelangle => 32, :labeldistance => 1.8, :fontsize => 7 } | Default edge attributes. |
Attributes
| graph | [RW] |