This project is archived and is in readonly mode.

#5285 ✓resolved
Sean

chaining two scopes with :includes, drops the second :includes

Reported by Sean | August 3rd, 2010 @ 03:18 PM | in 3.x

Maybe I'm doing something wrong, but it seems that when chaining scopes that each have an :includes on different tables, that only the first include is converted into a join in the generated SQL; the :include from the second scope is ignored. The scopes both work fine on their own, but fail when combined (since the second join is missing). I've tested it several different ways, and I'm led to believe that there may be a bug.

Full example here:

http://stackoverflow.com/questions/3393013/problem-activerecord-rai...

(running rails 3.0.0.beta4).

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages