Skip to content

Commit a3ae5bc

Browse files
committed
improve ActionControllerHelperMethod doc
1 parent 4a4b244 commit a3ae5bc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ql/src/codeql_ruby/frameworks/ActionController.qll

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,20 @@ class RedirectToCall extends ActionControllerContextCall {
156156
}
157157

158158
/**
159-
* A method in an `ActionController` class that is accessible from within a view as a helper method.
159+
* A method in an `ActionController` class that is accessible from within a
160+
* Rails view as a helper method. For instance, in:
161+
*
162+
* ```rb
163+
* class FooController < ActionController::Base
164+
* helper_method :logged_in?
165+
* def logged_in?
166+
* @current_user != nil
167+
* end
168+
* end
169+
* ```
170+
*
171+
* the `logged_in?` method is a helper method.
172+
* See also https://api.rubyonrails.org/classes/AbstractController/Helpers/ClassMethods.html#method-i-helper_method
160173
*/
161174
class ActionControllerHelperMethod extends Method {
162175
private ActionControllerControllerClass controllerClass;

0 commit comments

Comments
 (0)