Вот мой код, я потратил много времени на это, но все еще не получил ответ. Форма завершилась в той же строке, где и началась, и из-за этого метода submit не добавляет значения флажков в database.please help?
< table>
<% pos = 0%>
<% @accounts.each do |myacc| %>
<% if @accounts.length == pos +1 %>
<tr class="last">
<% else%>
<tr>
<% end %> <!-- end of if tag -->
<td class="position"><%= pos += 1%>.</td>
<td ><%= myacc.name %>< /td>
< % form_for(:account,:html =>{:method =>:put,:id =>"editAccountForm_"+pos.to_s,:multipart => true}) do|f|%>
<td>
<% if myacc.place_matching == "1" %>
<input type="checkbox" id=place_matching value=1 checked="checked" />
<% else %>
<input type="checkbox" id=place_matching value=0 />
<% end %> <!-- end of if tag -->
</td>
<td>
<% if myacc.data_pulling == "1" %>
<input type="checkbox" id="data_pulling" value=1 checked="checked" />
<% else %>
<input type="checkbox" id="data_pulling" value=0 />
<% end %> <!-- end of if tag -->
</td>
<td>
<a class="gray-button gray-whitebg" href="#" onclick="getElementById('editAccountForm_<%= pos%>').submit();return false;" />ADD</a>
</td>
<% end %> <!-- end of form tag -->
</tr>
<% end %>
</table>