Help with form_for

I have this rhtml, that generate a table with the object @evaluations
filled it before. The problem is that i need to get those text_field
with the data loaded, but instead it’ filled all text_field whit the
last @evaluation.
What i am doing wrong?

<% form_for( @evaluations ) do |f| %>

<% for evaluation in @evaluations %>
<%= evaluation.id%>



  <td><%=f.text_field(:id, :size => 2) %></td>
  <td><%=f.text_field(:first_evaluation, :size => 2) %></td>
  <td><%=f.text_field(:second_evaluation, :size => 2) %></td>
  <td><%=f.text_field(:final_evaluation, :size => 2) %></td>

  <td><%= link_to 'Show', evaluation %></td>
  <td><%= link_to 'Edit', edit_evaluation_path(evaluation) %></td>
  <td><%= link_to 'Destroy', evaluation, :confirm => 'Are you

sure?’, :method => :delete %>


<% end %>
Student Commission Id Parcial 1 Parcial 2 Final
<%=h evaluation.student.fistName %> <%=h evaluation.commission.code %>

<%= f.submit "Update" %>

<% end %>

Thanks you much for your help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs