Skip to content

Commit d34cbbf

Browse files
committed
Merge pull request #153 from iquest/master
faster ancestry_path method
2 parents e328f1a + ee945b0 commit d34cbbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/closure_tree/model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def self_and_ancestors_ids
9797
# to the +name_column+.
9898
# (so child.ancestry_path == +%w{grandparent parent child}+
9999
def ancestry_path(to_s_column = _ct.name_column)
100-
self_and_ancestors.reverse.map { |n| n.send to_s_column.to_sym }
100+
self_and_ancestors.map { |n| n.send to_s_column.to_sym }.reverse
101101
end
102102

103103
def child_ids

0 commit comments

Comments
 (0)