Commit 57b46d764ae362735fa91610680552518c6fd8a6

Authored by Victor Costa
2 parents e62e7a6f ff045299

Merge branch 'api' into stable

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/api/v1/articles.rb
... ... @@ -46,7 +46,7 @@ module Noosfero
46 46 articles = articles.display_filter(current_person, nil)
47 47  
48 48 if votes_order
49   - articles = articles.joins('left join votes on articles.id=votes.voteable_id').group('articles.id').reorder('sum(votes.id) DESC')
  49 + articles = articles.joins(:votes).group('articles.id').reorder('sum(votes.id) DESC')
50 50 end
51 51  
52 52 present articles, :with => Entities::Article, :fields => params[:fields]
... ...