File tree Expand file tree Collapse file tree
ql/src/codeql_ruby/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,22 +44,15 @@ class ActiveRecordModelClass extends ClassDeclaration {
4444
4545/** A class method call whose receiver is an `ActiveRecordModelClass`. */
4646class ActiveRecordModelClassMethodCall extends MethodCall {
47- // The model class that receives this call, if any
48- private ActiveRecordModelClass recvCls ;
49-
5047 ActiveRecordModelClassMethodCall ( ) {
5148 // e.g. Foo.where(...)
52- recvCls .getModule ( ) = resolveScopeExpr ( this .getReceiver ( ) )
49+ exists ( ActiveRecordModelClass recvCls |
50+ recvCls .getModule ( ) = resolveScopeExpr ( this .getReceiver ( ) )
51+ )
5352 or
5453 // e.g. Foo.joins(:bars).where(...)
5554 this .getReceiver ( ) instanceof ActiveRecordModelClassMethodCall
5655 }
57-
58- // TODO: do we need this?
59- ActiveRecordModelClass getAnActiveRecordModelClass ( ) {
60- result = recvCls or
61- result = this .getReceiver ( ) .( ActiveRecordModelClassMethodCall ) .getAnActiveRecordModelClass ( )
62- }
6356}
6457
6558private predicate methodWithSqlFragmentArg ( string methodName , int argIndex ) {
You can’t perform that action at this time.
0 commit comments