acts_as_many_trees 0.2.1 → 0.2.2

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: 094bc99bd5e478b9b778e43278cd110fe32eef91
4
- data.tar.gz: 996eba95fb96a54ce14006a2decbf3f345aee9b9
3
+ metadata.gz: 470e6f4791e0acb15b9f6acffb5e576c2143f7f2
4
+ data.tar.gz: 291fc163aeffb728c54f176dffe70151ec16e7bf
5
5
  SHA512:
6
- metadata.gz: 0ba57d028d70f361b68fdb6a9548e05a00bd18f9b189033214311808b060f5d78efb978250265417d82f16c50745ae4d121311a86a4fab13001773d4e2943c73
7
- data.tar.gz: a42db790f468e0aaedaf6ca43418b1e4277643dde0eed558b5ed7891f84487e91a0f61293ba5f7c1d2e2b5f25518ddca3b5d0bffa33c2ea20b83c648ec809282
6
+ metadata.gz: 9b84921e9a4dc3de94d6cbe6e09c1ae5568df1a2dcdcbec8d488148bbfc0eafcddae0827d7ea70a3082c990526835dc1c0090dd56814e73c6716343b66456122
7
+ data.tar.gz: 839aa50646e2d2a56f13b1f5bbb1078f6bc87fe42ae5c0196bdcd9f1638c1baeccce494e6a5c4f3d82a41006435d729639122d59cd4f7825d45c4d161b3fdfc8
@@ -154,7 +154,7 @@ module ActsAsManyTrees
154
154
  and c.ancestor_id <> c.descendant_id
155
155
  and c.hierarchy_scope = '#{existing_name}'
156
156
  union
157
- select #{wrk_parent.descendant_id},c.descendant_id,c.generation,'#{temp_name}',c.position
157
+ select #{wrk_parent.descendant_id},c.descendant_id,#{wrk_parent.generation}+c.generation+1,'#{temp_name}',c.position
158
158
  from #{table_name} c
159
159
  where c.ancestor_id = #{wrk_item.descendant_id}
160
160
  and c.ancestor_id <> c.descendant_id
@@ -1,3 +1,3 @@
1
1
  module ActsAsManyTrees
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_many_trees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Small