When I add a new “product” using my rails creation application, the next line correctly adds the new product
@product = Product.new(params[:product])
When I try to add a new product using the following URL (trying to get POST data from a java program).
http:
The product was not created, however I can access the values of "serial" and "value" as follows:
@product = Product.new
@product.serial=params[:serial]
@product.value=params[:value]
@product.save
To further confuse me if I'm using rails application to add a new product, the variables params[:serial]and params[:value]empty.
Can someone please call me in the right direction.
thanks
source
share