It'd be very easy to do: posts has a column called 'favorited_count', so you just need to select posts and order them by that column. Actually, that use case is what I was thinking when I implemented favorites.
Best way to do this would be to add a named scope to Post.rb: named_scope :most_favorited, :order => 'posts.favorited_count DESC' On Thu, Sep 4, 2008 at 3:53 PM, garrett dehart <[EMAIL PROTECTED]>wrote: > Has anyone tried to list post by the number of favorites it has? > Essentially using the favorite as a voting system and then listing post by > the most favorites? > > Garrett > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
