Commit e62e7a6fa7f6a80a7296639af0810186c86b608e

Authored by Victor Costa
2 parents a0577377 dbffdf3c

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,7 +46,7 @@ module Noosfero
46 articles = articles.display_filter(current_person, nil) 46 articles = articles.display_filter(current_person, nil)
47 47
48 if votes_order 48 if votes_order
49 - articles = articles.joins('left join votes on articles.id=votes.voteable_id').group('articles.id').order('sum(votes.id) DESC') 49 + articles = articles.joins('left join votes on articles.id=votes.voteable_id').group('articles.id').reorder('sum(votes.id) DESC')
50 end 50 end
51 51
52 present articles, :with => Entities::Article, :fields => params[:fields] 52 present articles, :with => Entities::Article, :fields => params[:fields]