Why use like <% and <% = in views?
2 answers
<%= puts the return value of the code inside the page.
<% just execute the code.
Here is a good guide to ERB http://api.rubyonrails.org/classes/ActionView/Base.html
+10
What is..."> Here is a good guide to ERB http://api.rubyonrails.org/classes/ActionView/Base.htmlGeek asks and answersWhy use like <% and <% = in views?
2 answers<%= puts the return value of the code inside the page.<% just execute the code.source
share+10
All Articles