#756: refactoring according to Alexander's comment

This commit is contained in:
Vokhmin Alexey V 2013-02-06 19:28:03 +04:00
parent 44663efa1f
commit 453d3cab19
1 changed files with 1 additions and 2 deletions

View File

@ -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