Hello. Thanks in advance for your help. What is the slickest way of
accessing children of children.
My understanding is that you can use “Parent.children” to get the
children of an object, but Parent.children.children wont work (while
Child.children will, but doesn’t help)
Right now I’m using something like this
class Challenge < ActiveRecord::Base
has_many :challengers, :dependent => :destroy
has_many :posts, :finder_sql => ‘SELECT p.* FROM posts p LEFT JOIN
challengers chr ON p.challenger_id=chr.id WHERE chr.challenge_id =
to get from Challenges, through Challengers, to Posts, so I can write
Challenger.posts, but now I am running into trouble while trying to
extend the association.
Any thoughts? Sorry if this is an ignorant question. I’m very new to