From 453d3cab1916ee2788db1adea2ff54a1fced8b86 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 6 Feb 2013 19:28:03 +0400 Subject: [PATCH] #756: refactoring according to Alexander's comment --- lib/abf_worker/base_observer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/abf_worker/base_observer.rb b/lib/abf_worker/base_observer.rb index 6f2befd2d..45151da79 100644 --- a/lib/abf_worker/base_observer.rb +++ b/lib/abf_worker/base_observer.rb @@ -30,8 +30,7 @@ module AbfWorker sort_results_and_save results end - def sort_results_and_save(results, item = nil) - item ||= subject + def sort_results_and_save(results, item = subject) item.results = results.sort_by{ |r| r['file_name'] } item.save! end