Skip to content

Commit bb04294

Browse files
authored
Merge pull request rails#53126 from chancancode/patch-1
Fix broken code snippet in helper doc comments
2 parents 60cb67b + 679cbd3 commit bb04294

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)