Agile Web Development with Rails 8_B7.0 (pages 93/94)

A new_product method is defined and never used. Also, the image_url parameter is never used:

def new_product(image_url)
  Product.new(title: "My Book Title",
  description: "yyy",
  price: 1)
  product.image.attach(io: File.open("test/fixtures/files/lorem.jpg"),
  filename: "lorem.jpg", content_type: "image/jpeg")
end

The file logo.svg does not exist in the test/fixtures/files folder, but is located in the db/images folder.

product.image.attach(io: File.open("test/fixtures/files/logo.svg"),
filename: "logo.svg", content_type: "image/svg+xml")