I\'m sort of new to Ruby on Rails and have been learning just fine, but have seem to run into a problem that I can\'t seem to solve.
Running Rails 3.0.9 & Ruby 1
.each
returns the entire array at the end once it is finished the loop.
<%= ... %>
prints out the value of the statment, which is the value returned by .each
<% ... %>
does not. So you want:
<% @events.each do |f| %>
<%= f.name %><%= link_to "View", event_path(f) %><br/><hr/>
<% end %>
You should be using <%
, not <%=
for your .each
line, so
<%= @events.each do |f| %>
should be
<% @events.each do |f| %>