module ActionView::Helpers::TextHelper
def concat(string)
<% end %>
<%= link_to "Sign In", action: :sign_in %>
<% unless signed_in? %>
is equivalent to
%>
end
concat link_to("Sign In", action: :sign_in)
unless signed_in?
<%
<% concat "hello" %> is equivalent to <%= "hello" %>
can use the +concat+ method.
output text within a non-output code block (i.e., <% %>), you
do not operate as expected in an eRuby code block. If you absolutely must
<%= "text" %> eRuby syntax. The regular +puts+ and +print+ methods
The preferred method of outputting text in your views is to use the
def concat(string) output_buffer << string end