Fixed problem with through association with STI. #14046 #14080

Open
wants to merge 1 commit into
from

2 participants

@arturmalecki

There were a problem with through association with STI #14046

The problem was caused by Foo.unscoped. If model Foo was create via STI Foo.unscoped.valuse[:where] returns where condition to handle the STI logic.

But on through association on the first place we don't want to put this were clause to join table. I simply added check for reflection.scope. And if it is blank than simply skip this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment