has_siblings 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_siblings/class_methods.rb +1 -1
- data/lib/has_siblings/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b9d1f499235250537032de08d3fa519a4c1e604
|
4
|
+
data.tar.gz: 327722172be38d3ae65980a655f4895830fc21fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f396ab071b76d64499c9a1e6d9d597f4c03ca9be06f49d95b40f611305aa1ea7a1bd03c8edfc3424036086906e3ff086b2da2076af91940612d5a03cdf465a3c
|
7
|
+
data.tar.gz: 0ba16e8cccddff04f4c4b29f615513b66bcb8853cc2758d8b3e5182330e81704f21a47fcdea00fa3f5bb973d3445404d5c31eda63b1c2bc4e783142b1e849fb3
|
@@ -26,7 +26,7 @@ module HasSiblings
|
|
26
26
|
|
27
27
|
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
|
28
28
|
def #{name}
|
29
|
-
return
|
29
|
+
return self.class.none if [#{parents.join(",")}].any?(&:nil?)
|
30
30
|
#{([first_parent_association] + merge_scopes).join(".")}.where.not(id: id)
|
31
31
|
end
|
32
32
|
CODE
|
data/lib/has_siblings/version.rb
CHANGED