Refactor: grouping parent and their space by including array.
This commit is contained in:
parent
2f7f46b256
commit
784aa266bd
3 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue