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

fix "has_one => has_many => has_many" name generation #232

Merged
merged 1 commit into from
Feb 3, 2013

Conversation

basvanwesting
Copy link

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.

lest added a commit that referenced this pull request Feb 3, 2013
fix "has_one => has_many => has_many" name generation
@lest lest merged commit ae3250b into ryanb:master Feb 3, 2013
@lest
Copy link
Collaborator

lest commented Feb 3, 2013

Great! Thank you <3

@basvanwesting
Copy link
Author

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.

@abo-elleef
Copy link

just add your fix to the gem but it still gives me repeated html names for added items

@basvanwesting
Copy link
Author

Do you mean you get the 2 items when clicking the add button?

@abo-elleef
Copy link

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

@abo-elleef
Copy link

it update the last item attributes in the db not adding new row

@basvanwesting
Copy link
Author

I can't reproduce that error. Also I'm not sure if this issue is related to this pull request.
Can you post the form you use?

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