I've added an index action for the microposts controller in order to create a view which has a list of all microposts. I've incorporated the Active Record Reputation System gem from a Railscast I watched and am trying to sort my microposts index by # of votes. Everything works except sorting by votes. I think it has something to do with the scope but I haven't been able to wrap my head around it.
Here is the question with more details on stack