Skip to content

Commit 679cbd3

Browse files
authored
Fix broken code snippet in doc comments [ci-skip]
See https://api.rubyonrails.org/classes/AbstractController/Helpers/ClassMethods.html#method-i-helper_method A new line is required for the code snippets to render correctly
1 parent 26a4a5d commit 679cbd3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

actionpack/lib/abstract_controller/helpers.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def inherited(klass)
104104
# Declare a controller method as a helper. For example, the following
105105
# makes the `current_user` and `logged_in?` controller methods available
106106
# to the view:
107+
#
107108
# class ApplicationController < ActionController::Base
108109
# helper_method :current_user, :logged_in?
109110
#
@@ -118,6 +119,7 @@ def inherited(klass)
118119
# end
119120
#
120121
# In a view:
122+
#
121123
# <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%>
122124
#
123125
# #### Parameters

0 commit comments

Comments
 (0)