my view is basically a loop creating a lot of fields, I want to store all field values to database when the button Store Scores is pressed, how can I access each fields score and store it in the right level.score attribute from the controller's *save_scores* method?:
<p>Found : <%= @levels.length%> levels.</p>
<h2>Score board:</h2>
<% @levels.each do |level|%>
<%= form_for(level) do |f| %>
<% if level.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(level.errors.count, "error") %> prohibited this level from being saved:</h2>
<ul>
<% level.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.text_field :score %>
</div>
<div class="actions">
<!--<%= f.submit %> -->
</div>
<% end %>
<%end%>
<%= button_to "Store Scores",
:action => 'save_scores',
:id =>@game
%>