From 2e62ec86e5ce95d4e7c8eba2d95a8c76a32e9a3a Mon Sep 17 00:00:00 2001 From: zzjin Date: Wed, 10 May 2017 14:05:03 +0800 Subject: update yield to return string path --- app/helpers/tree_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 3da58a91d53..e0d3e9b88f3 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -81,7 +81,7 @@ module TreeHelper part_path = "" parts = @path.split('/') - yield('..', parts) if parts.count > max_links + yield('..', File.join(*parts.first(parts.count - 2))) if parts.count > max_links parts.each do |part| part_path = File.join(part_path, part) unless part_path.empty? -- cgit v1.2.1