Answer the question
In order to leave comments, you need to log in
What is the correct way to use tags for ruby code in HTML?
In what cases is the <%= %> tag used to process ruby code in html , and in which <% %> ?
Is it possible to write several lines of ruby code in one tag, or only line by line enclosing in tags?
Answer the question
In order to leave comments, you need to log in
Smilez Gray <%= %> tag is used in cases where you want to insert something (the value of some variable). For example value="<%= @reserved_name %>"
, the value of the @reserved_name variable will be substituted, or so:
the <% %> tag is used in other cases, for example, to enclose a ruby expression in it
<%10.times do%>
<p> Hello world! </p>
<%end%>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question