lorenzo / linkable

Linkable behavior is the intelligent friend of Containable behavior. It will re-setup your associations on the fly when you require to join more than one association in the same query
26 stars 9 forks source link

Hotfix habtm foreign keys #3

Closed davidyell closed 11 years ago

davidyell commented 11 years ago

Issue When using a HABTM relationship with non-standard foreign keys, the behaviour would generate sql which would fail, because the foreignKey would be assumed.

Fix I've changed the code to read the keys from the habtm relationship.

Other bits I've also tidied up the test class a little, removing all the random tabs, and changing the old underscored methods to use a proper skip method. I've also added a new test which tests the new functionality.

lorenzo commented 11 years ago

thanks!