Permalink
Browse files

Duh, pass sort param to recursive calls.

  • Loading branch information...
1 parent fa7c37b commit d2f235ceecdaee908e01b36889f039df64f42754 @chris committed Oct 14, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/better_nested_set.rb
@@ -134,7 +134,7 @@ def recurse_result_set(result, options = {}, &block)
siblings.each do |sibling|
result_set.delete(sibling)
block.call(sibling, options[:level])
- opts = { :parent_id => sibling.id, :level => options[:level] + 1, :inner_recursion => true }
+ opts = { :parent_id => sibling.id, :level => options[:level] + 1, :inner_recursion => true, :sort_on => options[:sort_on]}
recurse_result_set(result_set, opts, &block) if options[:nested]
end
result_set.each { |orphan| block.call(orphan, options[:level]) } unless inner_recursion

0 comments on commit d2f235c

Please sign in to comment.