Ruby: Identify ActionController::API

`ActionController::API < ActionController::Base` is a base controller
class, so we should recognise it as such.
This commit is contained in:
Harry Maclean
2023-10-13 11:52:39 +01:00
parent 32b775fdc3
commit 3ee425cc47

View File

@@ -100,11 +100,11 @@ private DataFlow::ConstRef actionControllerBaseClass() {
// In Rails applications `ApplicationController` typically extends `ActionController::Base`, but we
// treat it separately in case the `ApplicationController` definition is not in the database.
DataFlow::getConstant("ActionController").getConstant("Base"),
// ActionController::Metal technically doesn't contain all of the
// ActionController::Metal and ActionController::API technically don't contain all of the
// methods available in Base, such as those for rendering views.
// However we prefer to be over-sensitive in this case in order to find
// more results.
DataFlow::getConstant("ActionController").getConstant("Metal")
// However we prefer to be over-sensitive in this case in order to find more results.
DataFlow::getConstant("ActionController").getConstant("Metal"),
DataFlow::getConstant("ActionController").getConstant("API")
]
}