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 trialAnuj Nagpal
552 PointsNo route matches [DELETE] "/todo_lists/1/todo_items"
Routing Error No route matches [DELETE] "/todo_lists/1/todo_items"
Rails.root: /Users/anuj.nagpal/project/odot
Application Trace | Framework Trace | Full Trace Routes
4 Answers
Product Team
6,835 PointsTry this:
<%= link_to "Delete", todo_list_todo_item_path(todo_item.todo_list, todo_item), method: :delete, data: { confirm: "Are you sure?" } %>
My reading of this is you need to pass in which list you are deleting from AND which item is being deleted to the method.
Sherwyn Cooper
Courses Plus Student 8,910 PointsNeed to see your code seems like you made an error in the routes file
Jeff Lange
8,788 PointsYes, as Sherwyn said above, you'll need to post the todo_item_controller.rb file, the view file that goes with it (possibly show.html.erb? It will be in the todo_item folder in the views folder), and the routes.rb file.
Brian Patterson
19,588 PointsI am getting the same error. What was the solution?