This project is archived and is in readonly mode.

#3190 ✓duplicate

HABTM no longer works when using multiple databases

Reported by sds | September 11th, 2009 @ 11:03 AM

The check has_primary_key? in has_and_belongs_to_many_association.rb fails when using multiple databases because it uses ActiveRecord::Base's connection and not the correct connection for the association.

This change changes it to use the @owner connection.

This first broke on this commit
- which was removed by commit - but was again added by this commit

I enclose a patch to fix it.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by