From 8dcde8fc5916b015010bf64553dc7a61d936175d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 20 Apr 2011 07:16:23 +0000 Subject: [PATCH] scm: code clean up RepositoriesHelper. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5506 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/repositories_helper.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index fb1d4dd05..4b9743c8d 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -49,7 +49,8 @@ module RepositoriesHelper when 'A' # Detects moved/copied files if !change.from_path.blank? - change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C' + change.action = + @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C' end change when 'D' @@ -57,7 +58,7 @@ module RepositoriesHelper else change end - end.compact + end.compact tree = { } changes.each do |change| @@ -73,13 +74,11 @@ module RepositoriesHelper end p[:c] = change end - render_changes_tree(tree[:s]) end def render_changes_tree(tree) return '' if tree.nil? - output = '' output << '