# HG changeset patch # User Chris Cannam # Date 1395409059 0 # Node ID 9f37f7e39d3cfd10e4c8aa498c67066f32ffcd3c # Parent fb773fcf9af871fed622468fc2f73dea0089a9bf Fixes to the prior commit diff -r fb773fcf9af8 -r 9f37f7e39d3c app/helpers/projects_helper.rb --- a/app/helpers/projects_helper.rb Fri Mar 21 13:20:11 2014 +0000 +++ b/app/helpers/projects_helper.rb Fri Mar 21 13:37:39 2014 +0000 @@ -313,7 +313,7 @@ threshold = scores[scores.length / 2] if threshold == 0 then threshold = 1 end mhash = Hash.new - phash.keys.select do |k| + phash.keys.shuffle.select do |k| if phash[k] < threshold or k.description == "" then false else @@ -321,7 +321,7 @@ mgrs = [] u.keys.each do |r| if r.allowed_to?(:edit_project) - mgrs << u[r] + u[r].each { |m| mgrs << m } end end novel = (mhash.keys & mgrs).empty?