summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-09 09:47:47 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2015-01-01 21:12:00 +0100
commit33c9f05c6bb90a995ddc685b4a22479f17c575e5 (patch)
tree8dd374b515eeb5e9194ab3c52e46b569cfb5f2e8 /app/helpers/tree_helper.rb
parentac1584249c262e447a6360734597fa17fe077718 (diff)
downloadgitlab-ce-33c9f05c6bb90a995ddc685b4a22479f17c575e5.tar.gz
Append in place for strings and arrays
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 e32aeba5f8f..8693acad994 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