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 trial

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,014 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,681 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!