I have a table of forms

```
<% @group.lessons.each do |lesson| %>
  <%= form_for [@group, lesson] do |f| %>
    <tr id='<%= lesson.id%>' >
      <td><%= f.text_field :time %></td>
      <td><%= f.text_field :day %></td>
      <td><%= f.text_field :subject %></td>
      <td><%= f.text_field :teacher %></td>
      <td><%= f.text_field :room %></td>
      <td><%= f.submit 'Update'%></td>
      <td><%= link_to 'Delete', [lesson.group, lesson], method: :delete%></td>
    </tr>
  <%end%>
<%end%>

```

Each form updates an entry when the "update" button is clicked. But when you edit two entries and update only one, the info you edited in the other one is gone. 

I want to have a button to update each entry in the table. How do I do this?