Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Generate a Scaffold

janeporter
PLUS
janeporter
Courses Plus Student 23,471 Points

delete doesn't seem to be working for me

in the following code:

<p id="notice"><%= notice %></p>

<h1>Listing Todo Lists</h1>

<table> <thead> <tr> <th>Title</th> <th>Description</th> <th colspan="3"></th> </tr> </thead>

<tbody> <% @todo_lists.each do |todo_list| %> <tr> <td><%= todo_list.title %></td> <td><%= todo_list.description %></td> <td><%= link_to 'Show', todo_list %></td> <td><%= link_to 'Edit', edit_todo_list_path(todo_list) %></td> <td><%= link_to 'Destroy', todo_list, method: :delete, data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table>

<br>

<%= link_to 'New Todo list', new_todo_list_path %>

the

<td><%= link_to 'Destroy', todo_list, method: :delete, data: { confirm: 'Are you sure?' } %></td> 

line to 'Destroy' does not get executed for whatever reason. 'Show' and 'Edit' works fine. I'm on Windows 10 Pro running Rails 4.2.5.