Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 2nd, 2007, 10:54 PM
Newbie
 
Join Date: Oct 2007
Posts: 1
Default Insert Multile Records ?

I am a newbie to Ruby and wondering how to insert multiple records at the same time.

I want to create a form such that it accept multiple records and save it to DB upon submitting the form instead of one record at a time.
Reply
  #2  
Old July 8th, 2008, 10:19 PM
Expert
 
Join Date: May 2007
Posts: 179
Default

My first thought is that you will want to set the form up in a way that you can, in the controller, loop all the form fields for each record. Then, as you loop, you should be able to validate each individual record. Using Javascript on the view side, you could allow rows to be added as needed, and it wouldn't affect the controller save method, since it just loops all fields.
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles