File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,13 @@ private module RenderCallUtils {
29
29
result = getTemplatePathValue ( renderCall ) .regexpCapture ( "^/?(.*/)?(?:[^/]*?)$" , 1 )
30
30
}
31
31
32
- // everything after the final slash, or the whole string if there is no slash
33
- private string getBaseName ( MethodCall renderCall ) {
34
- result = getTemplatePathValue ( renderCall ) .regexpCapture ( "^/?(?:.*/)?([^/]*?)$" , 1 )
35
- }
36
-
37
32
/**
38
33
* Gets the template file to be rendered by this render call, if any.
39
34
*/
40
35
ErbFile getTemplateFile ( MethodCall renderCall ) {
41
- result .getTemplateName ( ) = getBaseName ( renderCall ) and
36
+ // everything after the final slash, or the whole string if there is no slash
37
+ result .getTemplateName ( ) =
38
+ getTemplatePathValue ( renderCall ) .regexpCapture ( "^/?(?:.*/)?([^/]*?)$" , 1 ) and
42
39
result .getRelativePath ( ) .matches ( "%app/views/" + getSubPath ( renderCall ) + "%" )
43
40
}
44
41
You can’t perform that action at this time.
0 commit comments