small medium large xlarge

David_pragsmall
13 Nov 2010, 00:35
David Klanac (4 posts)

I am unable to create an Order object in Task G1. It appears that the has_many :line_items is causing the exception, because I’m able to create the object when I comment out the declaration.

I’ve checked the code samples and cannot find a discrepancy. Has anybody else run into this error?

ArgumentError in OrdersController#new

wrong number of arguments (0 for 1)

app/models/order.rb:7
app/controllers/orders_controller.rb:32:in `new'
Micahsq_pragsmall
13 Nov 2010, 00:54
Micah Alcorn (4 posts)

Please post your OrdersController code.

David_pragsmall
13 Nov 2010, 01:01
David Klanac (4 posts)

Amazing. Ask the forum and then suddenly the solution appears on its own. I set :destroy as destroy without the colon to make it a symbol.

You must be logged in to comment