title: Is it possible to rank a model using acts_as_votable by the number of friends who voted up?
body: <p>Questions relates to the acts_as_votable gem.</p>
  
  <p>I know you could sort Posts (for example) in order by using <code>Post.order(:cached_weighted_average =&gt; :desc)</code>but could I find a way of ranking Posts by the number of a user's friends who had upvoted a post?</p>
  
  <p>I could do something like <code>&lt;% @posts_ranked_by_friend_likes = current_user.friends &amp; Post.get_upvotes.voters %&gt; &lt;%= @posts_ranked_by_friend_likes.size %&gt;</code> and it would display the number of friends who voted up on that post but how would I be able to turn something like this into a ranked list? </p>