search for: last_post_d

Displaying 1 result from an estimated 1 matches for "last_post_d".

Did you mean: last_post_id
2006 Jun 21
6
Sort table by child row property?
I''m building a simple forum system which features a topics and a posts table. The topic model has a has_many association with the post model, i.e.: class Topic < ActiveRecord::Base { has_many :posts } class Post < ActiveRecord:Base { belongs_to :topic, :dependent => true } Now, I wish to sort the topics by the created_at property of the last post, but I can''t