# Newbie: Submitting the same form multiple times at once

**URL:** <https://www.ruby-forum.com/t/newbie-submitting-the-same-form-multiple-times-at-once/118049>\
**Category:** Rails\
**Created:** [October 23, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/newbie-submitting-the-same-form-multiple-times-at-once/118049 "2007-10-23T16:12:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveamos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Post date:** [October 23, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/newbie-submitting-the-same-form-multiple-times-at-once/118049/1 "2007-10-23T16:12:40Z")

</div>

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 %\>

| \<%= game.home\_team.name %\> | \<%= text\_field 'guess', 'hometeam\_score' %\> | \<%= text\_field 'guess', 'visitingteam\_score' %\> | \<%= game.away\_team.name %\> | \<%= game.gameweek %\> |

\<%= submit\_tag “Submit” %\>

And the controller:

def create  
@guess = Guess.new(params[:guess])  
if @guess.save  
flash[:notice] = ‘

Your game has been  
saved.

’  
redirect\_to :controller =\> ‘guess’, :action =\> ‘index’  
else  
render :action =\> ‘new’  
end  
end

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.

Thanks!
