# Need to move multiple fields to a new table - please help!

**URL:** <https://www.ruby-forum.com/t/need-to-move-multiple-fields-to-a-new-table-please-help/92905>\
**Category:** Ruby\
**Created:** [April 25, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/need-to-move-multiple-fields-to-a-new-table-please-help/92905 "2007-04-25T16:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [April 25, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/need-to-move-multiple-fields-to-a-new-table-please-help/92905/1 "2007-04-25T16:12:33Z")

</div>

Okay I have a “list” view that contains a package inventory stored in a  
table called addpackages. Attributes include fname, lname,  
packagetype, email, phone, etc.

Here’s what I’ve done already:

1. When you click the last name of a person in the list view simulating  
they are picking the package up, you go to my custom edit view.

 \<%= link\_to addpackage.lname, :action =\> "edit", :id =\> addpackage.id %\>
1. Here is my custom edit view:

**User must enter initials to claim package:**

1. This all works fine for getting the signature in the addpackages  
table. What I would like to do at this point is copy a few  
attributes(lname, fname, signature, phone) to a table called receipts?  
I’ve already created a relationship between addpackages and receipts, I  
just need help with coding behind this operation. I figure I would  
perform this operation in the addpackage controller under “def edit” but  
I really need a kick start to coding this or someone to tell me this is  
the correct way to do it.

Help will be greatly greatly appreciated!!!

-Tony

---

<div class="post-metadata">

**Author:** ![merc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@merc](https://www.ruby-forum.com/u/merc)\
**Post date:** [April 25, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/need-to-move-multiple-fields-to-a-new-table-please-help/92905/2 "2007-04-25T16:26:19Z")

</div>

Tony M. wrote:  
[snip Rails questions]

> Help will be greatly greatly appreciated!!!

The Rails folks can help you better, I guess:

> **[Ruby on Rails](https://rubyonrails.org)**
>
> A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

–  
Phillip “CynicalRyan” Gawlowski  
[http://cynicalryan.110mb.com/](http://cynicalryan.110mb.com/)  
[http://clothred.rubyforge.org](http://clothred.rubyforge.org)

Rule of Open-Source Programming #34:

Every successful project will eventually spawn a sub-project
