Agile Web Development with Rails 7: Example code does not work delete method (page 78) (solved)

On page 78 the following code appears:

<%= link_to ‘Destroy’, product,
class: ‘hover:underline’,
method: :delete,
data: { confirm: ‘Are you sure?’ } %>

After disappearing UJS in Rails 7, I think it’s more correct:

<%= link_to “Destroy”, product,
class: ‘hover:underline’,
data: {turbo_method: :delete, turbo_confirm: “Are you sure?” }, %>

I love the book, I have all the above. Cheers.

1 Like

¡Buena atrapada! Lo arreglé.

(My comment about taking Spanish in high school in the I18n chapter is correct, and I am trying to pick the language back up again using duolingo, but I will confess that Google translate helped above)

Genial!

Si encuentro alguna errata más, te lo escribo en español y así vas practicando. :wink:

Saludos.