Limit conflict calcluation to this year's preferences
This commit is contained in:
parent
5e83ea8b3c
commit
59cec71151
|
@ -3,8 +3,8 @@ class ConflictCoefficient
|
||||||
|
|
||||||
def self.all
|
def self.all
|
||||||
talk_combinations = Talk.find(:all, from: :halfnarp_friendly).map(&:id).combination(2)
|
talk_combinations = Talk.find(:all, from: :halfnarp_friendly).map(&:id).combination(2)
|
||||||
talk_preferences = TalkPreference.all
|
talk_preferences = TalkPreference.this_years
|
||||||
talk_preferences_count = TalkPreference.count
|
talk_preferences_count = talk_preferences.count
|
||||||
|
|
||||||
talk_combinations.map do |talks|
|
talk_combinations.map do |talks|
|
||||||
conflicts = talk_preferences.select do |talk_preference|
|
conflicts = talk_preferences.select do |talk_preference|
|
||||||
|
|
Loading…
Reference in New Issue