On Martes, 9 de Marzo de 2010 22:20:06 Klaus escribió:
> Hi all,
>
> I'm trying the hole day but it doesn't seem to work (at least not that
> way I'm trying it).
>
> I have a has_many association between Contact and Person (one Contact
> has_many People).
>
> ContactController:
> ...
> config.columns[:people].set_link('nested', :parameters =>
> {:associations => :people})
> config.columns[:people].link.inline = true
> config.columns[:people].link.popup = false
Popup false is not needed after set inline.
Also you can set inline in set_link, but I think is default value, with
config.columns[:people].set_link('nested', :inline => true, :parameters =>
{:associations => :people})
> Now I'd like to have such a link in my nested show-view. I'd like to
> click on the people in the show-view and it should switch to the
> nested associated people table.
>
> My problem is, that the action link I'm creating ignores the inline-
> setting:
> here is a part of my helper for the people_show_column:
>
> render_action_link(active_scaffold_config.columns[:people].link, {:id
> => record.id, :link => "My Description"} )
>
> shouldn't it take the original actionlink with all its settings and do
> exactly the same as in the list-view?
> but it opens a whole new page and displays the table with the
> associated people in it (not nested!).
It keeps settings, but inline true only adds the action class, and later with
ActiveScaffold.Actions.Record javascript function adds javascript code to load
inline.
You can override _show partial and add some javascript to enable show inline
with ActiveScaffold.Actions.Record, you can look at an example in
frontends/default/views/_list_record.html.erb
>
> this is the request for the working link in the list-view:
>
> Processing ContactsController#nested (for 127.0.0.1 at 2010-03-09
> 22:15:03) [GET]
> Parameters: {"associations"=>"people",
> "adapter"=>"_list_inline_adapter", "id"=>"2"}
>
> and this is the request for the (not working) show-view actionlink:
>
> Processing ContactsController#nested (for 127.0.0.1 at 2010-03-09
> 22:16:30) [GET]
> Parameters: {"associations"=>"people", "id"=>"2"}
>
> the inline adapter is missing and i really don't know how to get it
> there :(
>
> thanks for any help :)
>
> greeting
> klaus
--
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.