Closed lexruee closed 9 years ago
Instead of requesting a collection of users and selecting only those that are not befriended with you, ask your FriendSuggestion Helper.
This helper consults you with friend suggestions. The consultant hides all the necessary details and provides a simple interface:
friend_suggestions = FriendConsultant.consult(current_user)
It would be cool if the FriendConsultant caches all its rest requests to avoid long reponse times.
Because we only consider registered users in our app this issue is solved.
Instead of requesting a collection of users and selecting only those that are not befriended with you, ask your FriendSuggestion Helper.
This helper consults you with friend suggestions. The consultant hides all the necessary details and provides a simple interface:
friend_suggestions = FriendConsultant.consult(current_user)
It would be cool if the FriendConsultant caches all its rest requests to avoid long reponse times.