summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-21 23:07:15 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-21 23:07:15 -0800
commit2b10520b306697d7cbae8f3f84ca30cacc821fa4 (patch)
tree0140f05d7c568ed829d13c52bf35d7df7f51fb9c /app/helpers/tree_helper.rb
parent7f1633e2949acb53c25b92dd54a0f0a3ba2a9e6c (diff)
parent33c9f05c6bb90a995ddc685b4a22479f17c575e5 (diff)
downloadgitlab-ce-2b10520b306697d7cbae8f3f84ca30cacc821fa4.tar.gz
Merge pull request #7999 from cirosantilli/append-inplace
Append in place for strings and arrays [failure unrelated]
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index b65f8a33fec..1d987a6ffc0 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -10,13 +10,16 @@ module TreeHelper
tree = ""
# Render folders if we have any
- tree += render partial: 'projects/tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
+ tree << render(partial: 'projects/tree/tree_item', collection: folders,
+ locals: { type: 'folder' }) if folders.present?
# Render files if we have any
- tree += render partial: 'projects/tree/blob_item', collection: files, locals: {type: 'file'} if files.present?
+ tree << render(partial: 'projects/tree/blob_item', collection: files,
+ locals: { type: 'file' }) if files.present?
# Render submodules if we have any
- tree += render partial: 'projects/tree/submodule_item', collection: submodules if submodules.present?
+ tree << render(partial: 'projects/tree/submodule_item',
+ collection: submodules) if submodules.present?
tree.html_safe
end