Agile Web Dev with Rails 8 (pg 93)

Title: Agile Web Dev with Rails 8 (pg 93)

In product_test.rb:

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

Should be(???):

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

Yup, a copy/paste error. Good eye! Fixed.

1 Like