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 15:31:28 +0400
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-03-07 10:19:32 +0400
commit2f7f46b25655aa6f2c2a7756663c97ddb4491100 (patch)
tree550b87737e9a45147c980f3d795c9a419722bfda /app/helpers/graph_helper.rb
parent9dc46eee8ed31f3955f5a94731ab72e97797523a (diff)
Refactor: replace "render :json = graph.to_json" to view template(show.json.erb).
Because model shouldn't know about view logic.
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
new file mode 100644
index 00000000000..ba8c68a1ce0
--- /dev/null
+++ b/app/helpers/graph_helper.rb
@@ -0,0 +1,5 @@
+module GraphHelper
+ def join_with_space(ary)
+ ary.collect{|r|r.name}.join(" ") unless ary.nil?
+ end
+end