Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-03-06 16:01:40 +0400
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-03-07 10:19:42 +0400
commit784aa266bdd38ec560c11bea92fc9b815e2ca456 (patch)
tree7a2d933fdc7694bb6dbaf973992fd4abb32cc1df /app/helpers/graph_helper.rb
parent2f7f46b25655aa6f2c2a7756663c97ddb4491100 (diff)
Refactor: grouping parent and their space by including array.
Diffstat (limited to 'app/helpers/graph_helper.rb')
-rw-r--r--app/helpers/graph_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
index ba8c68a1ce0..369330151f4 100644
--- a/app/helpers/graph_helper.rb
+++ b/app/helpers/graph_helper.rb
@@ -2,4 +2,9 @@ module GraphHelper
def join_with_space(ary)
ary.collect{|r|r.name}.join(" ") unless ary.nil?
end
+
+ def parents_zip_spaces(parents, parent_spaces)
+ ids = parents.map { |p| p.id }
+ ids.zip(parent_spaces)
+ end
end