Josef Reidinger schrieb:
Stefan Schubert write:
ref: refs/heads/master
commit dd33d008822d216d94a061fcfc2017385c7fb0f9
Author: Stefan Schubert <[email protected]>
Date:   Thu Oct 8 13:50:13 2009 +0200

    test on empty list
---
 .../app/controllers/patch_updates_controller.rb    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git
 a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
 b/plugins/patch_updates/app/controllers/patch_updates_controller.rb index
 507b97f..8f25528 100644
--- a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
+++ b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
@@ -86,7 +86,7 @@ class PatchUpdatesController < ApplicationController

     flash.clear #no flash from load_proxy
     last_patch = ""
-    if patch_updates
+    if patch_updates.size > 0
Yes, you are right. "blank?" checks both. Thank you for the hint.

diff --git a/plugins/patch_updates/app/controllers/patch_updates_controller.rb b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
index 8f25528..7df017c 100644
--- a/plugins/patch_updates/app/controllers/patch_updates_controller.rb
+++ b/plugins/patch_updates/app/controllers/patch_updates_controller.rb
@@ -86,7 +86,7 @@ class PatchUpdatesController < ApplicationController

    flash.clear #no flash from load_proxy
    last_patch = ""
-    if patch_updates.size > 0
+    if !patch_updates.blank?
      #installing the first available patch
      logger.info "Installing patch :#{patch_updates[0].name}"
      begin


--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to