diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-01 17:00:28 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-01 17:00:28 +0300 |
commit | ae9dd6276267e0df2d9c2da3b89393e4ee212175 (patch) | |
tree | 4db4314bd54eda3bce6b3c67b719f1f5097fb68a /app/helpers/tree_helper.rb | |
parent | e219cf7246c6a0495e4507deaffeba11e79f13b8 (diff) | |
download | gitlab-ce-ae9dd6276267e0df2d9c2da3b89393e4ee212175.tar.gz |
Update code to work with gitlab_git 3
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r-- | app/helpers/tree_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 73d36d0801c..2dbc1cffb16 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -67,9 +67,9 @@ module TreeHelper end def tree_breadcrumbs(tree, max_links = 2) - if tree.path + if @path.present? part_path = "" - parts = tree.path.split("\/") + parts = @path.split("\/") yield('..', nil) if parts.count > max_links @@ -78,14 +78,14 @@ module TreeHelper part_path = part if part_path.empty? next unless parts.last(2).include?(part) if parts.count > max_links - yield(part, tree_join(tree.ref, part_path)) + yield(part, tree_join(@ref, part_path)) end end end def up_dir_path tree - file = File.join(tree.path, "..") - tree_join(tree.ref, file) + file = File.join(@path, "..") + tree_join(@ref, file) end def leave_edit_message |