From 6a9036ffeb4b225a7734d1d23fc46615a4b45647 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Tue, 24 Aug 2010 16:18:11 +0200 Subject: [PATCH] Fix exception if no plugins are installed --- lib/redmine/about.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/redmine/about.rb b/lib/redmine/about.rb index b65f67f19..67fd3549d 100644 --- a/lib/redmine/about.rb +++ b/lib/redmine/about.rb @@ -24,18 +24,18 @@ module Redmine checklist = environment[:checklist].collect {|label, value| [l(label), value ? "Yes" : "No"]} info = environment[:rails].collect {|label, value| [(label.is_a?(Symbol) ? l(label) : label), value]} - plugins = environment[:plugins].collect {|plugin| [plugin.name, plugin.version] } + plugins = environment[:plugins].collect {|plugin| [plugin.name, plugin.version] } || nil # get overall width of label column column_width = [ checklist.collect {|label, value| label.length }.max, info.collect {|label, value| label.length }.max, - plugins.collect {|label, value| label.length }.max + plugins.collect {|label, value| label.length }.max || 0 ].max output += print("Checklist", checklist, column_width) output += print("Rails info", info, column_width) - output += print("Plugins", plugins, column_width) + output += print("Plugins", plugins, column_width) if plugins.present? output end