Children oddity?

22 views
Skip to first unread message

Arve Voldsund

unread,
Oct 26, 2012, 4:57:25 PM10/26/12
to hobo...@googlegroups.com
A project model with three has_many relationships listed as children like so:
  children :tasks, :projectfiles, :notes

The oddity is that only the first child in the children declaration get the new link appended in the automatic child view on the project show page. 

All of them are working fine individually, but no matter how the children listing is ordered, it's only the first child that has the new link.

Am I missing something?

arve

Bob Sleys

unread,
Oct 26, 2012, 5:26:27 PM10/26/12
to hobo...@googlegroups.com
Nope that is just the way it works automatically.  You'll need to add the new links manually.   Use something like

<append-projectfiles-collection-section:>
[add you link here]
</append-projectfiles-collection-section:>

To get the link syntax just look in the autogenerated tags for the show page and there is the one created for the first child just copy and tweak it for the second and third collections.

Bob

Arve Voldsund

unread,
Oct 26, 2012, 5:29:29 PM10/26/12
to hobo...@googlegroups.com
Ok, that's fine! Thanks.
Reply all
Reply to author
Forward
0 new messages