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 trialBrian Patterson
19,588 PointsPlease can someone help
Please can someone help me with the error I am getting.
1) Deleting todo items is successful
Failure/Error: click_link "Delete"
ActionController::RoutingError:
No route matches [DELETE] "/todo_lists/1/todo_items/1/edit"
# ./spec/features/todo_items/delete_spec.rb:17:in `block (3 levels) in <top (required)>'
# ./spec/features/todo_items/delete_spec.rb:16:in `block (2 levels) in <top (required)>'
Where do I start to debug this. How can I correct this.
6 Answers
Brian Patterson
19,588 PointsThanks Steve for your help. I have managed to sort this out.
Steve Hunter
57,712 PointsHi Brian,
Is your project in a remote Github repository?
You've got a bad route so your controller isn't working quite right, or routes aren't defined.
There's also an issue with the view you're on. Your delete route looks like it is called from the edit link. Github will help, else I'll get more specific with my thoughts.
Steve.
Brian Patterson
19,588 PointsHere is the link to my Github Steve https://github.com/amidabrian51/odot.git
Steve Hunter
57,712 PointsDo your other routes work?
Brian Patterson
19,588 PointsRemind me how can I check that?
Steve Hunter
57,712 PointsIf you get no errors when navigating the page. Routes get you to the right bit of your page.
Brian Patterson
19,588 PointsWhat do you mean?
Steve Hunter
57,712 PointsFor example, the current test that is failing is saying that you are unable to delete a todo_item. It is saying there's no route to the delete result.
I'll do this in the morning. I need to punt the dogs out for a wee and then I need sleep.
Steve.
Brian Patterson
19,588 PointsNo problem! It's cold out there wrap up! Thanks for your help.
Brian Patterson
19,588 PointsMy index.html.erb in todoitems was wrong. Someone noticed this on Stackoverflow. Thought I would spread my net out wide.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsThat was proper cold, yes! Brrrr! But being hauled around by 4 large dogs made it a little warmer than it might have been.
Well done fixing the issue; what was it?