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 Cleaning Up Our View

Rob Williams
Rob Williams
18,708 Points

Having trouble with the completed_at test

Hi. I've entered the code as per the video and all seemed to be going ok until suddenly the test passed in the video but not in my code. The strange thing though is when I run the server it does exactly what it's supposed to do, i.e. display the completed_at date and time in exactly the right format! Not sure where i'm going wrong

4 Answers

Hey Rob, are you using the exact versions of Rails etc. as Jason in the video?

I went with the latest versions/gems and really had to dig into the documentation as a number of things can change.

https://teamtreehouse.com/forum/rails-todo-application-test-issue

There is a typo in your code somewhere. Go through all your code to make sure it matches the video. Gonna need more info to be able to help better.

Rob Williams
Rob Williams
18,708 Points

I think the problem is I haven't been using dom_id so maybe that's caused an issue. I'm using

within("#todo_item_#{todo_item.id}") do

instead of

within dom_id_for(completed_todo_item) do

which is in the video. But it should be doing essentially the same thing?

Rob Williams
Rob Williams
18,708 Points

underscores either side of the 'item'

Rob Williams
Rob Williams
18,708 Points

Sorry was just being stupid there, I had to use 'completed item id' instead of 'item id' in the curlies