.each method block leaves a hash after end?
im following the tutorial on http://ruby.railstutorial.org/ and im on chapter 10.
ive noticed after i do a .each method block it leaves a hash of all the items in the block. why is it doing this? its not on the pictures in the tutorial..
ex:
-
<%=开发者_C百科 @users.each do |user| %>
- <%= user.name %> <% end %>
i have included a screenshot of what happens with the hash at the end
.You don't need to print the first line
<%= ... %>
Should be
<% ... %>
精彩评论