From 13ac2b1c29d71aba65f47509422ebfbe385b401b Mon Sep 17 00:00:00 2001 From: AnkushMalik Date: Sat, 10 Mar 2018 19:02:28 +0530 Subject: [PATCH] Change user opportunity algo User project matching based on project title and description Closes #34 --- app/models/user.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 581ff720c..644281f47 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -69,6 +69,9 @@ def recommended_projects else projects = word.projects end + (Episode.active.projects - word.projects).each do |p| + projects << p if p.description.include? word.name or p.title.include? word.name + end projects.each do |p| next unless p.active? recommended << p