diff --git a/lib/closure_tree/hash_tree_support.rb b/lib/closure_tree/hash_tree_support.rb index 9e2a0b62..f9925646 100644 --- a/lib/closure_tree/hash_tree_support.rb +++ b/lib/closure_tree/hash_tree_support.rb @@ -14,7 +14,7 @@ def default_tree_scope(scope, limit_depth = nil) ON #{quoted_table_name}.#{model_class.primary_key} = generation_depth.descendant_id SQL scope_with_order(scope.joins(generation_depth), 'generation_depth.depth') - end + end def hash_tree(tree_scope, limit_depth = nil) limited_scope = limit_depth ? tree_scope.where("#{quoted_hierarchy_table_name}.generations <= #{limit_depth - 1}") : tree_scope @@ -33,4 +33,4 @@ def build_hash_tree(tree_scope) tree end end -end \ No newline at end of file +end