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

**URL:** <https://forum.devtalk.com/t/agile-web-development-with-rails-7-example-code-does-not-work-delete-method-page-78/38321>\
**Category:** PragProg Customers\
**Tags:** book-agile-web-development-with-rails-7, suggestion\
**Created:** [28 January 2022 23:31 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-example-code-does-not-work-delete-method-page-78/38321 "2022-01-28T23:31:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazardco](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hazardco/32/3810_2.png) [@hazardco](https://forum.devtalk.com/u/hazardco)\
**Post date:** [28 January 2022 23:31 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-example-code-does-not-work-delete-method-page-78/38321/1 "2022-01-28T23:31:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rubys](https://forum.devtalk.com/user_avatar/forum.devtalk.com/rubys/32/3797_2.png) [@rubys](https://forum.devtalk.com/u/rubys)\
**Post date:** [29 January 2022 01:58 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-example-code-does-not-work-delete-method-page-78/38321/2 "2022-01-29T01:58:18Z")

</div>

¡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)

---

<div class="post-metadata">

**Author:** ![hazardco](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hazardco/32/3810_2.png) [@hazardco](https://forum.devtalk.com/u/hazardco)\
**Post date:** [29 January 2022 08:01 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-example-code-does-not-work-delete-method-page-78/38321/3 "2022-01-29T08:01:09Z")

</div>

Genial!

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

Saludos.
