Check out the :counter_cache option of belongs_to. If you order by
that and limit to 10, you'll probably have what you're after.

/Ritchie

On May 25, 12:42 am, badnaam <asitkmis...@gmail.com> wrote:
> What's the best way to handle views that show the top 10/most popular/
> Recently updated/most commented type listing?
>
> Should I have a separate model that is populated with records from
> other models by a background job or should I need to use some sort of
> caching? Perhaps both?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to