Asking for help for in_place_editor_field

The in-place editor works for me, but not when I'm iterating over
objects in an array. I have the following in my view:
<% @session_types.each do |s| %>
  <p><%= in_place_editor_field :s, 'name' %></p>
<% end %>

@session_types is an array of objects that have the attribute 'name'.
However, I'm getting the error message:
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id

Nevermind. I found the answer here:
http://www.weeatbricks.com/2007/09/01/in_place_editor_field-method-in-ruby-on-rails/