Skip to content

Commit

Permalink
fix sqlite3 bug around Article.bestof
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Francois committed Apr 14, 2013
1 parent 80fd57a commit 56ea99a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/article.rb
Expand Up @@ -63,8 +63,8 @@ def spam
where('feedback.published' => true, 'feedback.type' => 'Comment',
'contents.published' => true).
group('contents.id').
order('count(feedback.*) DESC').
select('contents.*, count(feedback.*) as comment_count').
order('count(feedback.id) DESC').
select('contents.*, count(feedback.id) as comment_count').
limit(5)
}

Expand Down

0 comments on commit 56ea99a

Please sign in to comment.