through_hierarchy 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d035058e70928adac98eda0a5bfbb11f64511184
|
4
|
+
data.tar.gz: ea5fdd65f17ffca9c986110d25779d2cd77e2246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ffd8d6d39235e151ab3f1f66eb0fa0167065dc2d10626b50ec30f737a50818d4baf618e0cc7823a29cedc663cebdf9b7edfc4a1d86bbcffdc9c512514692d9e
|
7
|
+
data.tar.gz: ae0d68f9add8a0eb7b8bec6c10e6004e58219a31b1d744e130fac861d0ac760aa5de7e04c0f96552bcdb8e1b7f5327e39d3b4415a86d7d1c51c7dd93236717fb
|
@@ -20,6 +20,13 @@ module ThroughHierarchy
|
|
20
20
|
and(foreign_key_column.eq(instance_key(instance)))
|
21
21
|
end
|
22
22
|
|
23
|
+
def create_with
|
24
|
+
{
|
25
|
+
foreign_type_name => instance_type(@instance),
|
26
|
+
foreign_key_name => instance_key(@instance)
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
23
30
|
def instance_type(instance)
|
24
31
|
instance.class.base_class.to_s
|
25
32
|
end
|