Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.3K
Views
Ruby on Rails guide DELETE section not working
<%= link_to "Destroy", article_path(@article), data: {
                turbo_method: :delete,
                turbo_confirm: "Are you sure?"
              } %>

This is listed on the official website of Ruby on Rails as a simple way of deleting an Active Record. I have the same controller method as they do. This does not delete, nor does it confirm. I have found other methods that successfully delete, but none that confirm. I would like to understand why this doesn't delete, and how I can confirm.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

This SO post addresses a similar problem and answered by @json fb. Quoting statements from the SO post

This happens if you had locally installed gem versions 7.1.0 or 7.1.1 for turbo-rails

These gem numbers were pushed by accident to Rubygems in October, then yanked. However, since bundler will default to the highest number of your Rails gem when it sets up your new rails app, it will pick turbo-rails version 7.1.0 or 7.1.1 , which will display this flaw

The gems were yanked, so this only affects you if you were developing rails apps between October 2021 and the yank date. TO FIX YOUR COMPUTER: gem uninstall turbo-rails

over 4 years ago · Santiago Trujillo Report

0

<ul>
<li><%= link_to "Edit", edit_article_url(@article) %> </li>
<li><%= button_to "Destroy", article_path(@article), method: :delete,
            data: { method_turbo_confirm: "Are you sure?" }
 %></li>

Changing link_to to button_to and adding method: :delete worked for me. Although the "Are you sure?" pop up is still not working.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!