There seems to be a difference between the two, Though I can\'t tell what exactly.
<% code %>
And
<%= code %>
<
<% %>
will evaluate the ruby code contained
<%= %>
will evaluate and render the code contained
So a template containing:
Hello <% user.name %> how are you?
...would output:
Hello how are you
...whilst...
Hello <%= user.name %> how are you?
...would output:
Hello fred how are you
<% %>
is commonly used for iterators
<% @users.each do |user| %>
- <%= user.name %>
<% end %>