File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
actionview/lib/action_view/helpers Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -46,17 +46,20 @@ module TextHelper
46
46
# output text within a non-output code block (i.e., <tt><% %></tt>), you
47
47
# can use the +concat+ method.
48
48
#
49
+ # <% concat "hello" %> is equivalent to <%= "hello" %>
50
+ #
49
51
# <%
50
- # concat "hello"
51
- # # is the equivalent of <%= "hello" %>
52
- #
53
- # if logged_in
54
- # concat "Logged in!"
55
- # else
56
- # concat link_to('login', action: :login)
57
- # end
58
- # # will either display "Logged in!" or a login link
52
+ # unless signed_in?
53
+ # concat link_to("Sign In", action: :sign_in)
54
+ # end
59
55
# %>
56
+ #
57
+ # is equivalent to
58
+ #
59
+ # <% unless signed_in? %>
60
+ # <%= link_to "Sign In", action: :sign_in %>
61
+ # <% end %>
62
+ #
60
63
def concat ( string )
61
64
output_buffer << string
62
65
end
You can’t perform that action at this time.
0 commit comments