If we want nested forms we have to use the following structure:
(Parent object) has many (children objects)*
I thought our relation was:
Tasks > Many vacancies > Many Candidatures > Many Resources
However, studying our schema and models I was able to see that this relation wasn't right. In fact was:
Tasks > Many vacancies > Many Candidatures
Resource > Many Candidatures
So, we can't apply a nested form from Candidature to Resource, because the parent object is resource and not candidature.
After that, I removed the nested form for resource and wrote a modification in the update controller. If we push the 'Accept' button, we change the state of candidature to :accepted. If we push the 'Deny' button, we change the candidature state to :denied
I have now a view that works, although it isn't finished.
Keine Kommentare:
Kommentar veröffentlichen