Enable 'Recommended proposals' setting for users

This commit is contained in:
Angel Perez
2018-06-04 11:29:02 -04:00
parent 522c206f6d
commit a58f6a2662
9 changed files with 24 additions and 4 deletions

View File

@@ -210,8 +210,8 @@ class Proposal < ActiveRecord::Base
def self.proposals_orders(user)
orders = %w{hot_score confidence_score created_at relevance archival_date}
orders << "recommendations" if user.present?
orders
orders << "recommendations" if user&.recommended_proposals
return orders
end
protected