diff options
author | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-06 20:31:28 +0900 |
---|---|---|
committer | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-07 15:19:32 +0900 |
commit | 2f7f46b25655aa6f2c2a7756663c97ddb4491100 (patch) | |
tree | 550b87737e9a45147c980f3d795c9a419722bfda /app/helpers/graph_helper.rb | |
parent | 9dc46eee8ed31f3955f5a94731ab72e97797523a (diff) | |
download | gitlab-ce-2f7f46b25655aa6f2c2a7756663c97ddb4491100.tar.gz |
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.rb | 5 |
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 |