On Sat, Aug 9, 2008 at 10:07 PM, Kyle M. <
[email protected]> wrote:
I am attempting to display articles via how recently created their last
comment was – basically how any forum is ordered. How would I do this?
Thank you very much.
One possible approach is to:
add a commented_at timestamp column to Article.
in your Comment model, put in code for after_create to set the
Article’s commented_at column to the current date time.
now, when you do Article.find, just add an option for :order =>
Hope this helps.