acts_as_many_trees 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_many_trees/base.rb +2 -2
- data/lib/acts_as_many_trees/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: 5830fa861ba6a6d478abca5c1ec6277ada647790
|
4
|
+
data.tar.gz: 8dd8ecd5fc49d5155811b671fd87642736f021ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f16d138a22cd7848e9ac60b07c43dcdd529866f38bbd8c4d9c2b684ed7d7e21ee1927539f6aab18b8b60741afd4110db08539c6fd83a7737f73dfee4227060e1
|
7
|
+
data.tar.gz: dfcaa8f53e61ca2d5df1d20c22069b85cae12255c80ab2aad986694cc632b31a207bf3798c7363e92c41f5361daf2eef6f7e7be05e313e525284d2a2ac80873c
|
@@ -45,12 +45,12 @@ module ActsAsManyTrees
|
|
45
45
|
:source=>:item_siblings
|
46
46
|
}
|
47
47
|
has_many :siblings_before,
|
48
|
-
->{where(
|
48
|
+
->{where("unscoped_ancestor_links_siblings_before_join.position > #{hierarchy_table_name}.position").where('unscoped_ancestor_links_siblings_before_join.generation=1')},
|
49
49
|
{:through=>:unscoped_ancestor_links,
|
50
50
|
:source=>:item_siblings
|
51
51
|
}
|
52
52
|
has_many :siblings_after,
|
53
|
-
->{where(
|
53
|
+
->{where("unscoped_ancestor_links_siblings_after_join.position < #{hierarchy_table_name}.position").where('unscoped_ancestor_links_siblings_after_join.generation=1')},
|
54
54
|
{:through=>:unscoped_ancestor_links,
|
55
55
|
:source=>:item_siblings
|
56
56
|
}
|