diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-09 11:47:47 +0400 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2015-01-01 23:12:00 +0300 |
commit | 33c9f05c6bb90a995ddc685b4a22479f17c575e5 (patch) | |
tree | 8dd374b515eeb5e9194ab3c52e46b569cfb5f2e8 /app/helpers/tree_helper.rb | |
parent | ac1584249c262e447a6360734597fa17fe077718 (diff) |
Append in place for strings and arrays
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r-- | app/helpers/tree_helper.rb | 9 |
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 |