Closed divoxx closed 7 years ago
Ya, I think this is good. I'd remove the whitespace and do that as a separate style pull request, but otherwise :+1:.
I just found another issue, there is more work to be done here. I'll let you guys know when it's done.
Is it possible to have a test case for the problem that shows the issue and that it is solved?
@divoxx, Thank you for your fix!
@stffn, Do you have any information when this PR could be merged to master? Thank you in advance!
Was this addressed on a separate patch? Does this PR still make sense? We're currently using our fork with this fix but I'd love to go back to mainstream repo.
I found a bug on Rails 4, after the merge of #196. Basically, when working with an association proxy, sometimes it would create an new object to use for the authorization but that object would then be lingering in the association collection. So, later on the controller or view your association collection would have an unsaved unpopulated object.
This change ensures that the object gets removed after the authorization happen.
There is some noise on the PR due editor cleaning up whitespace. I added comments to the actual changes. Would be nice to have other people test it.
@zeiv, @gordonbisnor, @aepstein and @maletor: thoughts?