Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

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

Merged
merged 2 commits into from
Mar 26, 2011

Conversation

pirelenito
Copy link
Contributor

I found the bug while working with the gem on a MongoID project with a deeply nested form:
embeds_one -> embeds_many

Paulo Ragonha added 2 commits March 10, 2011 15:26
…n a "many" relationship.

Example: project[tasks_attributes][assignments_attributes][1] instead of project[tasks_attributes][0][assignments_attributes][1].

Now the parent_ids array is never null.
@ryanb ryanb merged commit ad56697 into ryanb:master Mar 26, 2011
@pirelenito
Copy link
Contributor Author

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:

root[child_attributes][deep_child_attributes][0][attribute]

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

@pirelenito pirelenito reopened this Apr 5, 2011
@pirelenito
Copy link
Contributor Author

I've created a new issue: #26

@sivapradeepmsc
Copy link

The asset "defaults.js" is not present in the asset pipeline. i got this error ..how to fix this error ..please explain this !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants