When I add a new "product" using my scaffold create rails app, the following line properly adds a new product
@product = Product.new(params[:product])
When I try to add a new product using the following URL (trying to POST data up from a java program).
http://localhost:3000/products?serial=555&value=111
The product is not created, however I can access the "serial" and "value" values like this:
@product = Product.new
@product.serial=params[:serial]
@product.value=params[:value]
@product.save
To further confuse me, if I use the rails app to add a new product, the params[:serial]
and params[:value]
variables are empty.
Can someone please point me in the right direction.
Thanks