inserting multiple tuple into the database from single form

<% for i in 1..5 %>
  <%= render :partial=>'user', :locals => { :index => i } %>
<% end %>

in your _user.rhtml:

<%= text_field "user_#{index}", 'field_name' %>
<%= text_field "user_#{index}", 'field_name_2' %>

in your controller:

for i in 1..5
  user = User.new(params["user_#{index}"])
  user.save
end

when you do the batch edit, it is quite the same way.