genealogy 2.6.3 → 2.6.4

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
  SHA256:
3
- metadata.gz: 97f461fa3a5e968d7f272d1a9ef1f20bc2108f60a6749e8e94046c2653112d66
4
- data.tar.gz: 609016f406c5bfe72820be1736181232960b018b48ca16662cf1470bad729df4
3
+ metadata.gz: 4018c3163fa6f6597b2c34e1b03c0f9fb489bd924f2005aaf4dd220809869deb
4
+ data.tar.gz: 6577a730fe4448def2c650746a3bd582f8622b5f28a8f15a6d442729612f1afd
5
5
  SHA512:
6
- metadata.gz: 0feff7049a767fb26e7a77cbd350973979ec85dcac616cc33d6e3a5b524d57f560a717181dac7f59c19724ef75259d371e62430c79e09708fd4ec439c3e2ef88
7
- data.tar.gz: 392c130489392630814de7197dda4231c60e8a0607be6973e7328ce172e70ec480435ee21de6deaa24304255a0bb17ae6f90b7ea6220a33e9ffbe90127210576
6
+ metadata.gz: 53a20632af604fbc079e787d73f00d9f12f4c78d4df34fd5e6b80fb3ea0624c97c9cff1fabcd2e5eb2a0302ea59a493c7451b136ad0aefab2a7f607662100829
7
+ data.tar.gz: 81b4228b4dc6b7ededc5caf5fd350b028a68519fdb98ac318fbd66354a8f89f290ce947b30418bfde2ceafd15318fe5da54c3d87488d599662e7486d53695389
@@ -36,6 +36,8 @@ module Genealogy
36
36
  class_attribute :gclass, instance_writer: false
37
37
  self.gclass = self
38
38
 
39
+ alias_attribute :id, self.primary_key.to_sym if self.primary_key != 'id'
40
+
39
41
  self.extend(Genealogy::ComplexQueryMethods::ClassMethods)
40
42
 
41
43
  class_attribute :ineligibility_level, instance_accessor: false
@@ -73,7 +73,7 @@ module Genealogy
73
73
  # @return [ActiveRecord::Relation] list of fullsiblings and/or halfsiblings
74
74
  def siblings(options = {})
75
75
  spouse = options[:spouse]
76
- result = gclass.where("id != ?",id)
76
+ result = gclass.where.not(id: id)
77
77
  case options[:half]
78
78
  when nil # only full siblings
79
79
  result.all_with(:parents).where(father_id: father, mother_id: mother)
@@ -1,3 +1,3 @@
1
1
  module Genealogy
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genealogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - masciugo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-04 00:00:00.000000000 Z
11
+ date: 2019-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord