Support ActiveRecord SQL executing calls where there is a self receiver (implicit or explicit)

This commit is contained in:
Alex Ford
2021-06-23 18:31:36 +01:00
parent 5386c776b3
commit 91bde8d85d

View File

@@ -52,6 +52,13 @@ class ActiveRecordModelClassMethodCall extends MethodCall {
or
// e.g. Foo.joins(:bars).where(...)
this.getReceiver() instanceof ActiveRecordModelClassMethodCall
or
// e.g. self.where(...) within an ActiveRecordModelClass
(
this.getReceiver() instanceof Self
and
this.getEnclosingModule() instanceof ActiveRecordModelClass
)
}
}