activerecord_uml 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activerecord_uml/diagram_drawer.rb +7 -3
- data/lib/activerecord_uml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2abcbc6eff7c040819407f366d069092e03eab839f769360030637af73535b25
|
4
|
+
data.tar.gz: 7ea892c78d8297850f57a7b976af9c71a2a1b2a893a9bbce6effae986e58f187
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77c58d014dd66aff2699ef266a8e89ce5eb5c0c9d92e02231b5204fd893523abb5ea5d34b6165667685549959b6d54d7970a321d7aecde9b0f981dc2045b17f
|
7
|
+
data.tar.gz: ae244cdaa9b8c32b1c5a9f0dd18264d0c2f4609bc20d7f6720b61062019fb96203f58cecaac4cd2a12e7a085ffb2047e746fefbcc0cb1d3fed2f1189ae998d9c
|
@@ -28,11 +28,11 @@ EOF
|
|
28
28
|
|
29
29
|
def relations
|
30
30
|
@class_name.reflect_on_all_associations(:belongs_to).map do |a|
|
31
|
-
"#{a.class_name} --* #{@class_name}"
|
31
|
+
"#{a.class_name} --* #{@class_name}#{label_for a}"
|
32
32
|
end.concat(@class_name.reflect_on_all_associations(:has_many).map do |a|
|
33
|
-
"#{@class_name} --* #{a.class_name}"
|
33
|
+
"#{@class_name} --* #{a.class_name}#{label_for a}"
|
34
34
|
end).concat(@class_name.reflect_on_all_associations(:has_one).map do |a|
|
35
|
-
"#{@class_name} --* #{a.class_name}"
|
35
|
+
"#{@class_name} --* #{a.class_name}#{label_for a}"
|
36
36
|
end)
|
37
37
|
end
|
38
38
|
|
@@ -56,5 +56,9 @@ EOF
|
|
56
56
|
[m.to_s, method_parameters.join(", ")]
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
def label_for(association)
|
61
|
+
association.class_name != association.name.to_s.classify ? " : #{association.name.to_s.classify}" : ''
|
62
|
+
end
|
59
63
|
end
|
60
64
|
end
|