each.do error with one record

Hello, I realize that the reason I am getting this error is because my
code returns many records when there is more than one to be found.
However, if it only finds one, the each.do flakes out and gives me a
NoMethodError. What is the best way to handle it?

# -- Find all events for a given school
@events = Event.find_by_school_id(params[:school_id], :order =>

# -- each.do code to loop through each one:
<table class="eventList">
<% @events.each do |e|%>
    <td><%= e.date.strftime('%I:%M %p') %></td>
    <td><%= link_to e.title, :action => 'show', :id => e.id %></td>
    <td><%= link_to e.school.name, :action => 'list', :school_id =>
e.school %>
<% end %>

Thank you for you help

I think you want
    @events = Event.find_all_by_school_id(...)

find_by_school_id only returns the first found.

That's it. Thank you.