fix "has_one => has_many => has_many" name generation#232
Conversation
fix "has_one => has_many => has_many" name generation
|
Great! Thank you <3 |
|
Thanks and also to Kevin Rood of course for coming up with the original patch. By the way, I was thinking. The name I chose for the top level entry ("Company") is actually not so well chosen. A company generally has many projects. Maybe "Startup" or something would be a better name, because that usually does have only one project. Shall refactor the specs for this or do think it doesn't matter. |
|
just add your fix to the gem but it still gives me repeated html names for added items |
|
Do you mean you get the 2 items when clicking the add button? |
|
when clicking add button it gives me new item with the same name of the exists item so it just update the last item not creating new one |
|
it update the last item attributes in the db not adding new row |
|
I can't reproduce that error. Also I'm not sure if this issue is related to this pull request. |
reworked patch from #125 (thanks to kevinrood) with added specs.
Specs should probably be refactored to something nicer, but it makes the case for the "has_one => has_many => has_many" situation.
I also added a "has_one => has_many" case to show that it didn't break there yet.