Association Extensions no longer working in Rails 2.3.10 <p>I have an app that we just upgrade from 2.1.0 to 2.3.10. After the upgrade, an Association Extension that previously worked causes a failure. Here is the code on the model for the extension:</p> <pre><code>Class Classroom has_many :registrations has_many :students, :through =&gt; :registrations, :uniq =&gt; true do def in_group(a_group) if a_driver scoped(:conditions =&gt; ['registrations.group_id = ?', a_group]) else in_no_group end end def in_no_group scoped(:conditions =&gt; 'registrations.group_id is null') end end end </code></pre> <p>This is a simplified model of my actual issue, but basically I used to be able to do</p> <pre><code>classroom.students.in_group(honor_students) </code></pre> <p>This no longer works, with the following output: </p> <pre><code>classroom.students.in_group(honor_students) ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'registrations.group_id' in 'where clause': SELECT * FROM `students` WHERE (registrations.group_id = 1234) </code></pre> <p>When I just grab the list of students, the SQL has all the expected join syntax there thats missing from the above version:</p> <pre><code>SELECT DISTINCT `students`.* FROM `students` INNER JOIN `registrations` ON `students`.id = `registrations`.student_id WHERE ((`registrations`.classroom_id = 9876)) </code></pre> <p>Why is the association extension missing all the join SQL?</p>