On Jueves, 13 de Enero de 2011 02:02:33 p k escribió:
> I have the following relationship between my models:
> 
> Model_A has_many Model_C through=> Model_B
> Model_C has_many Model_E through=> Model_D
> On the activescaffold page for Model_A, I get the list of Model_Cs
> associated with it.
> 
> Now for each Model_C, I want to add a custom link that shows me the
> list of Model_Ds associated with that record. I added an inline custom
> link that calls a method list_items which is as following:
> 
> def list_items
>     render :action=>'_nested', :location=>"/model_cs/<model_c_id>/
> nested?_method=get&associations=model_d", :layout => false
> end

:location only set HTTP Location header. Why don't you add a nested link 
(config.nested.add_link) in Model C controller?

> 
> But, what I see is that an inline pane opens below the record for
> model C with nothing in it.
> 
> Is location=> the correct way to do this?
> 
> Thanks.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to