end_of_association_chain object?

Skip to first unread message


Oct 12, 2008, 2:47:57 PM10/12/08
to resource_controller
Hey all,

I'm trying to learn all the ins and outs of resource_controller. I'm
not sure I understand the idea of the association_chain. It appears I
have access to an object in my controller called
end_of_association_chain. Judging from the code this is equivilant to
my model object that I can access by the instance variable @object. Is
this assumption correct? Can anyone help me understand the
association_chain concept and how my model in the end of it?

Thanks all!

Corey Haines

Oct 24, 2008, 2:04:03 PM10/24/08
to resource_controller
Hey, Joe!

I believe that it is for when you are using nested resources.

So, if I have something like

then the association chain goes: owners -> contributors ->

at each step of the way, it uses end_of_association chain to get to
the object that it asks for the children from. @owner.contributors,

Reply all
Reply to author
0 new messages