Skip to content

Commit 96a34c3

Browse files
committed
QL4QL fix
1 parent 53a3417 commit 96a34c3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ruby/ql/lib/codeql/ruby/frameworks/ActiveStorage.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,8 @@ module ActiveStorage {
118118
* ```
119119
*/
120120
private class AttachmentInstance extends DataFlow::CallNode {
121-
Association assoc;
122-
123121
AttachmentInstance() {
124-
exists(string model | model = assoc.getTargetModelName() |
122+
exists(Association assoc, string model | model = assoc.getTargetModelName() |
125123
this.getReceiver().(ActiveRecordInstance).getClass() = assoc.getSourceClass() and
126124
(
127125
assoc.isSingular() and this.getMethodName() = model

0 commit comments

Comments
 (0)