has_many through a habtm - what's the "source"?


Our classes use these associations:


All adults are frogs, and each frog is mother or father to numerous tadpoles.

Declaring the right-side association is easy, via the hidden adults_tadpoles table:

  Tadpole.has_and_belongs_to_many :adults   Adult.has_and_belongs_to_many :tadpoles

Declaring the -1--* is easy too, when each Adult has a frog_id:

  Adult.belongs_to :frog   Frog.has_many :adults

Now how do we add a collection of tadpoles to Frog? This attempt...

  Frog.has_many :tadpoles, :through => :adults, :source => :tadpoles

...invariably complains:

  Invalid source reflection macro :has_and_belongs_to_many for has_many :tadpoles,    :through => :adults. Use :source to specify the source reflection.

So, what's a "source reflection"?