@@ -312,12 +312,10 @@ private class LocalAssignsHashSyntheticGlobal extends SummaryComponent::Syntheti
312
312
313
313
/** A summary for `render` calls linked to some specific ERB file. */
314
314
private class RenderLocalsSummary extends SummarizedCallable {
315
- private string id ;
316
315
private LocalAssignsHashSyntheticGlobal glob ;
317
316
318
317
RenderLocalsSummary ( ) {
319
- this = "rails_render_locals()" + id and
320
- glob .getId ( ) = id
318
+ this = "rails_render_locals()" + glob .getId ( )
321
319
}
322
320
323
321
override Rails:: RenderCall getACall ( ) { result .getTemplateFile ( ) = glob .getErbFile ( ) }
@@ -331,16 +329,14 @@ private class RenderLocalsSummary extends SummarizedCallable {
331
329
332
330
/** A summary for calls to `local_assigns` in a view to access a `render` call `locals` hash. */
333
331
private class AccessLocalsSummary extends SummarizedCallable {
334
- private string id ;
335
332
private LocalAssignsHashSyntheticGlobal glob ;
336
333
337
334
AccessLocalsSummary ( ) {
338
- this = "rails_local_assigns()" + id and
339
- glob .getId ( ) = id
335
+ this = "rails_local_assigns()" + glob .getId ( )
340
336
}
341
337
342
338
override MethodCall getACall ( ) {
343
- id = getErbFileIdentifier ( result .getLocation ( ) .getFile ( ) ) and
339
+ glob . getId ( ) = getErbFileIdentifier ( result .getLocation ( ) .getFile ( ) ) and
344
340
result .getMethodName ( ) = "local_assigns"
345
341
}
346
342
@@ -365,13 +361,11 @@ private predicate renderHasLocalsKey(Rails::RenderCall c, string key) {
365
361
}
366
362
367
363
private class AccessLocalsKeySummary extends SummarizedCallable {
368
- private string id ;
369
364
private LocalAssignsHashSyntheticGlobal glob ;
370
365
private string methodName ;
371
366
372
367
AccessLocalsKeySummary ( ) {
373
- this = "rails_locals_key()" + id and
374
- id = glob .getId ( ) + "#" + methodName and
368
+ this = "rails_locals_key()" + glob .getId ( ) + "#" + methodName and
375
369
methodName = getAMethodNameFromErbFile ( glob .getErbFile ( ) )
376
370
// TODO: this would cut down massively on impossible flow steps, but fails due to non-monotonic recusrion problems
377
371
// and
0 commit comments