i am programming a function to sort articles by the number of comments
had today but i keep having sql errors
i want to use something like (doesnt work actually)
@articles = Articles.find(:all, :include => ‘comments’, :conditions =>
comments.created_at >’, Time.now - 86400], :order => 'COUNT(comments.id)
it is in :order i dont really know what to put in
i can do it in about 2 lines without the :order and then with a sort!
want now to paginate so i need to wrap it all in 1 sql query.