has_siblings 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 225b2668f88cde5bcb19f84fdb8e39e3d0638bf9
4
- data.tar.gz: 5c3e1ee5c93536affd5e803ad55b26dc0eb080cd
3
+ metadata.gz: 1b9d1f499235250537032de08d3fa519a4c1e604
4
+ data.tar.gz: 327722172be38d3ae65980a655f4895830fc21fc
5
5
  SHA512:
6
- metadata.gz: 8ca3a08dd3c86bd0215f65e32a43b4ae58ac0c8f387256037d2444ce448179c23f1a41706246bba38fa4c9fb2413ca2da3fbd9a91823e72ab4f017d6ef95237f
7
- data.tar.gz: 8cad965dc87162c9dc77e6d753a9585d9ff8250061df889073ed7ad5660aeb1b13b796e240864cc820622a3cdac9b40dbef3e715da77ccd24ee369ad29037a7b
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 [] if [#{parents.join(",")}].any?(&:nil?)
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
@@ -1,3 +1,3 @@
1
1
  module HasSiblings
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_siblings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Octavian Neamtu