Ensure recommendations are only shown when enabled

This commit is contained in:
Angel Perez
2018-07-12 09:39:25 -04:00
parent 463c753880
commit a143fa447b
6 changed files with 10 additions and 8 deletions

View File

@@ -210,7 +210,7 @@ class Proposal < ActiveRecord::Base
def self.proposals_orders(user)
orders = %w{hot_score confidence_score created_at relevance archival_date}
orders << "recommendations" if user&.recommended_proposals
orders << "recommendations" if Setting['feature.user.recommendations_on_proposals'] && user&.recommended_proposals
return orders
end