Answer the question
In order to leave comments, you need to log in
What is the difference between "%=%" and "%%" dynamic inserts in Rails (html.erb)?
Good afternoon, I have a question: what is the difference between "<%= %>" and "<% %>" in Ruby on Rails ?
Answer the question
In order to leave comments, you need to log in
The <% %> tags are used to execute Ruby code that doesn't return anything, such as conditions, loops, or blocks, while the <%= %> tags are used when you need the result of execution.
"<% %>" to evaluate expressions
"<%= %>" also, only with output of the evaluated expression to the template, to display
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question