List of Nth removed associated objects.

Given the following..

Foo has_many :bars Bar has_many ::widgets Widget has_many :gadgets Gadget has_many :parts

All of the following are now possible...

@foo.bars @bar.widgets @part.gadget.widget.bar.foo

However, I can't just do the opposite of that last one...

@foo.bars.widgets.gadgets.parts

and get a full list of every Part associated with @foo.

I know there's several different ways to get the same information (i.e. Part.find(:all, :include => {:gadget => {:widget => {:bar => :foo}}}, :conditions => ['foos.id = ?,@foo]) ), but I much prefer the look and feel of the syntax "@foo.bars.widgets.gadgets.parts".

I did some googleing for any plugins that might provide this but came up empty handed. I also spent some time working on creating a plugin that would provide this, but ran into problems and had to go back to get some real work done to justify the paycheck.

So, now my questions for the community is... 1. Does anyone know of a plugin that already provides this? 2. If not, does this seem like it should be possible, or am I missing something that makes this fundamentally impossible? 3. If it is possible, is it a worthwhile feature that other's would find useful, or is it a bad idea or not worth the changes required to Rails that would be necessary?

Thanks.

Oopss...wrong list :slight_smile: This list is meant for discussing development of the rails framework itself. Please resend this query to support/help mailing list - http://groups.google.com/group/rubyonrails-talk