Displaying 1 result from an estimated 1 matches for "quantity_id".
Did you mean:
quantity_#
2006 Jul 20
1
Having issues saving line items to the DB
....3
Windows XP/WebBrick
SQL Server Express 2005
Code
------------------------
Models:
Project
has_many :quotes
Quote
has_many :line_items
LineItem
belongs_to :quote
...
@project = Project.new(params[:project])
@quote=Quote.new(params[:quote])
@line_items=[]
if params[:line_item1][''quantity_id''] != ''''
@line_items << LineItem.new(params[:line_item1])
end
if params[:line_item2][''quantity_id''] != ''''
@line_items << LineItem.new(params[:line_item2])
end
...
@quote.project=@project
@quote.line_items << @lin...