column_names_with_alias allowed a nil through when used with associations without primary keys which breaks eager loading in some circumstances.
Fix eagerly loading associations without primary keys
@tenderlove @jonleighton the tests all pass
@jonleighton @tenderlove – the tests pass.
Could you just unit-test the JoinPart object to make sure that the column_names_with_alias returns the right thing? What we've got here is an integration test which is unnecessary.
@kreynolds any news on this pr?
I somehow missed the most recent comment putting the ball back in my court, I'll try to get to this in the next day or two
Change JoinPart test from an integration to a unit test
There are no other tests for the join_dependency section of AR so I made a new file with a minimal unit test in it and removed the integration test.
@jonleighton Is there anything additional this PR requires?
Add Changelog entry for #4976: fix eager load associations without pk…
…s [ci skip]