Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjaneporter
Courses Plus Student 23,471 Pointsdelete 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.