Commit e8f7b55d9c80f069ba7c3d526f888e30795a155e

Authored by Victor Costa
Committed by Leandro Santos
1 parent 63c7ffd1

api: fix vote score order

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/api/v1/articles.rb
... ... @@ -37,7 +37,7 @@ module Noosfero
37 37 articles = articles.display_filter(current_person, nil)
38 38  
39 39 if votes_order
40   - articles = articles.joins('left join votes on articles.id=votes.voteable_id').group('articles.id').order('sum(votes.id) DESC')
  40 + articles = articles.joins('left join votes on articles.id=votes.voteable_id').group('articles.id').reorder('sum(votes.id) DESC')
41 41 end
42 42  
43 43 present articles, :with => Entities::Article, :fields => params[:fields]
... ...