CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Predicate getAssociatedControllerClass

Gets an ActionControllerClass associated with the given ErbFile according to Rails path conventions. For instance, a template file at app/views/foo/bar/baz.html.erb will be mapped to a controller class in app/controllers/foo/bar/baz_controller.rb, if such a controller class exists.

Import path

import codeql.ruby.frameworks.ActionController
ActionControllerClass getAssociatedControllerClass(ErbFile f)