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 Editing Todo Lists

Alexander Bromage
PLUS
Alexander Bromage
Courses Plus Student 4,013 Points

index.html.erb contents different to those in video

I do not see the function(?) that calls the index number of the todo list task in my file. I haven't edited it since the application was created to my knowledge. It means that when I run the test in edit_spec.rb it fails with the following failure:

Failures:

  1) Editing todo lists Updates a todo list successfully with correct information
     Failure/Error: within "#todo_list_#{todo_list.id}" do
     Capybara::ElementNotFound:
       Unable to find css "#todo_list_1"
     # ./spec/features/todo_lists/edit_spec.rb:8:in `block (2 levels) in <top (required)>'

Any help would be appreciated!

1 Answer

Garrett Carver
Garrett Carver
14,680 Points

I think I had a similar problem, it was because I was looking at the wrong file:
odot/spec/views/todo_lists/index.html.erb_spec.rb

I should have been looking at this file:
odot/app/views/todo_lists/index.html.rb

In there, you should be able to find the spot to add

<tr id="<%= dom_id(todo_list) %>">

Hope that helps!