Deal gracefully with recommendations of hidden proposals
We were seeing an exceptions in the home page when displaying recommendations. This was due to trying to load tags of hidden proposals With this commit we are skipping proposals that that have been hidden, which will hopefully solve this exception
This commit is contained in:
@@ -328,7 +328,8 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def interests
|
||||
follows.map{|follow| follow.followable.tags.map(&:name)}.flatten.compact.uniq
|
||||
followables = follows.map(&:followable)
|
||||
followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user