Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

JavaScript bug when the parent of a deeply nested attribute is not in a "many" relationship. #26

pirelenito opened this Issue Apr 5, 2011 · 10 comments


None yet
6 participants

pirelenito commented Apr 5, 2011

The fix proposed in ryanb/nested_form#19 is not complete:

Actually there is still a bug regarding this scenario:

In a Root embeds_one Child embeds_many DeepChild, the name of a deeply nested field would be:


The javascript code responsible to fill the blueprint's parent's ids is broken, since it is always expecting an index after an /[a-z]+attributes/g ex:



ryanb commented Apr 5, 2011

Thanks for reporting this. I'll mark this to be fixed in the code.


ryanb commented Apr 23, 2011

I pulled in the change from @eljuanchosf which should fix this problem. Let me know if it doesn't and I'll re-open.

@ryanb ryanb closed this Apr 23, 2011

This problem is still happening for me


lest commented Nov 20, 2012

@garrettlancaster Could you please push a test application reproducing your issue?

Sure thing, here is the link: https://github.com/garrettlancaster/nested_form_failing. Let me know if you need anything else.

Oh, and make sure to add at least two gifts. It works if you only add one.

Overview of the contrived example:
Person belongs_to Birthday
Birthday has_many Gifts


lest commented Nov 21, 2012

@garrettlancaster Thanks! I'll take a look.

gedean commented Nov 26, 2012

It happens to me too.

@lest lest reopened this Dec 2, 2012

any progress on this?


eljuanchosf commented Feb 1, 2013

Es cierto, debería, pero por algún motivo no sucede lo que debería

Habría que identificar en donde se produce el cambio.

  • Tiraste un rake routes para ver si esta la ruta :locale/students/:id?
  • En los logs de la app, recibís un request de es/students/20 ?


On Sat 23 Apr 2011 02:06:28 PM ART, ryanb wrote:

I pulled in the change from @eljuanchosf which should fix this problem. Let me know if it doesn't and I'll re-open.

Mis mejores deseos,
Best wishes,
Meilleurs vœux,

Juan Pablo


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment