Hello,
I have a model called invoice and one called lineitem. An invoice
has_many lineitems, and an lineitem belongs to an invoice. I have a
model method that calculates the price of a lineitem, and one that
calculates all lineitems in an invoice. I want to have an edit page
that lists all the invoices lineitems and their calculated prices, with
a text field for a person to change the price that was calculated and
save it into a different column, and have one submit button. So I want
to be able to edit all the child objects and save the changes to a new
column, how could I implement this?
Thanks
Chris C.
concentrationstudios.com
On this day, 18-July-2006 1:18 AM, Chris C. wrote:
I have a model called invoice and one called lineitem. An invoice
has_many lineitems, and an lineitem belongs to an invoice. I have a
model method that calculates the price of a lineitem, and one that
calculates all lineitems in an invoice. I want to have an edit page
that lists all the invoices lineitems and their calculated prices, with
a text field for a person to change the price that was calculated and
save it into a different column, and have one submit button. So I want
to be able to edit all the child objects and save the changes to a new
column, how could I implement this?
Does this help?
http://www.og-consulting.com/2006/03/09/ruby-on-rails-insert-multiple-child-records/
P.V.Anthony