From a3ae5bcec47ac0a27c84140c9f52ebf3d19ff86f Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Thu, 26 Aug 2021 14:12:27 +0100 Subject: [PATCH] improve ActionControllerHelperMethod doc --- .../codeql_ruby/frameworks/ActionController.qll | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ql/src/codeql_ruby/frameworks/ActionController.qll b/ql/src/codeql_ruby/frameworks/ActionController.qll index 044ecdfacd7..53cc9d53ca9 100644 --- a/ql/src/codeql_ruby/frameworks/ActionController.qll +++ b/ql/src/codeql_ruby/frameworks/ActionController.qll @@ -156,7 +156,20 @@ class RedirectToCall extends ActionControllerContextCall { } /** - * A method in an `ActionController` class that is accessible from within a view as a helper method. + * A method in an `ActionController` class that is accessible from within a + * Rails view as a helper method. For instance, in: + * + * ```rb + * class FooController < ActionController::Base + * helper_method :logged_in? + * def logged_in? + * @current_user != nil + * end + * end + * ``` + * + * the `logged_in?` method is a helper method. + * See also https://api.rubyonrails.org/classes/AbstractController/Helpers/ClassMethods.html#method-i-helper_method */ class ActionControllerHelperMethod extends Method { private ActionControllerControllerClass controllerClass;