Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

fields_for #3

Closed
augustl opened this issue Apr 30, 2009 · 6 comments
Closed

fields_for #3

augustl opened this issue Apr 30, 2009 · 6 comments

Comments

@augustl
Copy link
Owner

augustl commented Apr 30, 2009

And nested attributes. Gogo!

@radar
Copy link

radar commented Apr 30, 2009

YS PLZ LOL

@augustl
Copy link
Owner Author

augustl commented Apr 30, 2009

omg u troll use votes not comment!!!

@augustl
Copy link
Owner Author

augustl commented May 3, 2009

Oh man this stuff wasn't trivial..

@jonsgreen
Copy link

I was wondering how progress with supporting nested attributes is going. Thanks for your hard work on this excellent plugin. I am not too experienced with meta ruby programming but let me know if I can lend a hand.

@augustl
Copy link
Owner Author

augustl commented Jul 4, 2009

When you have multiple fields_for elements (e.g. creating multiple tasks at the same time), Rails assigns the very same DOM ids to the fields, e.g #project_task_name. This is kind of stupid in the first place, since DOM ids aren't supposed to occur more than once, but it also makes it hard to just drop this in. I'll probably have to hack the field helpers to return my own IDs, using some kind of randomly generated unique identifier for each fields_for.

@radar
Copy link

radar commented Jul 15, 2009

And now I finally get around to responding...

For projectr, I used a hash of the current time as my own ID. Perhaps you could steal this code and put it to good use?

@augustl augustl closed this as completed Jan 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants