Say I have these models.
class Project < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :project belongs_to :user end class User < ActiveRecord::Base has_many :comments end
So that i can do
p = Project.find(1, :include => :comments) p.comments.collect(&:user).collect(&:name)
How can I say that I also want to include user comments?
source share