We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9bfc85 commit 2f3950bCopy full SHA for 2f3950b
lib/rails_erd/diagram/mermaid.rb
@@ -54,13 +54,25 @@ def filename
54
end
55
56
def relation_arrow(relationship)
57
- arrow_body = relationship.indirect? ? ".." : "--"
58
- arrow_head = relationship.to_many? ? ">" : ""
59
- arrow_tail = relationship.many_to? ? "<" : ""
+ arrow_body = arrow_body relationship
+ arrow_head = arrow_head relationship
+ arrow_tail = arrow_tail relationship
60
61
"#{arrow_tail}#{arrow_body}#{arrow_head}"
62
63
64
+ def arrow_body(relationship)
65
+ relationship.indirect? ? ".." : "--"
66
+ end
67
+
68
+ def arrow_head(relationship)
69
+ relationship.to_many? ? ">" : ""
70
71
72
+ def arrow_tail(relationship)
73
+ relationship.many_to? ? "<" : ""
74
75
76
77
78
0 commit comments