Skip to content

Commit c29eb81

Browse files
committed
Ruby: Reorganise ActionDispatch framework
Put routing modelling inside a Routing module.
1 parent e140d2a commit c29eb81

File tree

3 files changed

+811
-800
lines changed

3 files changed

+811
-800
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ActionControllerActionMethod extends Method, HTTP::Server::RequestHandler:
8383
* Gets a route to this handler, if one exists.
8484
* May return multiple results.
8585
*/
86-
ActionDispatch::Route getARoute() {
86+
ActionDispatch::Routing::Route getARoute() {
8787
exists(string name |
8888
isRoute(result, name, controllerClass) and
8989
isActionControllerMethod(this, name, controllerClass)
@@ -93,10 +93,10 @@ class ActionControllerActionMethod extends Method, HTTP::Server::RequestHandler:
9393

9494
pragma[nomagic]
9595
private predicate isRoute(
96-
ActionDispatch::Route route, string name, ActionControllerControllerClass controllerClass
96+
ActionDispatch::Routing::Route route, string name, ActionControllerControllerClass controllerClass
9797
) {
9898
route.getController() + "_controller" =
99-
ActionDispatch::underscore(namespaceDeclaration(controllerClass)) and
99+
ActionDispatch::Routing::underscore(namespaceDeclaration(controllerClass)) and
100100
name = route.getAction()
101101
}
102102

0 commit comments

Comments
 (0)