Sorry I'm very new to Ruby and this is probably a simple question and I am just searching wrong for it. For example:
<% flash.each do |key, value| %>
<%= content_tag :div, value, class: "alert alert-#{key}" %>
<% end %>
Why do we only use <% %> at the beginning and end of the loop, but <%= is used in the loop?
Another example, no loop involved:
<li><%= link_to "Contact Us", new_contact_path %></li>
Why am I using <%= instead of <% here? Thanks for helping me with this newb question