p.price = "3.25"
you are trying to set price to a string object. p.price = 3.25 or I suppose p.price = "3.25".to_f