Newbie: Submitting the same form multiple times at once

Hi everyone! I have a view that outputs several versions of the same
form, and I want the user to be able to fill all of them out, and hit
submit once. When that happens, I want each form entry to be submitted
into a database table. I just don’t know how to do that. Here’s what I
have now:

<% @gameweek.each do |game| %>

<% end %>
<%= %> <%= text_field 'guess', 'hometeam_score' %> <%= text_field 'guess', 'visitingteam_score' %> <%= %> <%= game.gameweek %>

<%= submit_tag “Submit” %>

And the controller:

def create
@guess =[:guess])
flash[:notice] = ‘

Your game has been

redirect_to :controller => ‘guess’, :action => ‘index’
render :action => ‘new’

I don’t know how to tell the controller to take each of those tr forms
and process them seperately. I’m sure this is easy, but I’ve never done
something like this before.


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