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 Adding Todo Items

Dawid Cedrych
Dawid Cedrych
15,108 Points

Keep getting the error "Unable to find field "Content"

I checked the project several times and everything seems to be alright, exactly the same as Jason showed on video.

Did any of you guys had this kind of issue?

Here is a link to the project https://github.com/thedc89/TodoList

Thanks in advance

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Your todo_items new view does not output anything. It should look like this:

<%= form_for [@todo_list, @todo_item] do |form| %>
  <%= form.label :content %>
  <%= form.text_field :content %>

  <%= form.submit "Save" %>
<% end %>

Notice two changes: the = sign before form_for and a space after text_field, before the %>.

Dawid Cedrych
Dawid Cedrych
15,108 Points

Thanks a lot! My debugging should be more detailed!:)

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Just do manually what the test is doing and you will know what went wrong ;)

Leo Brown
Leo Brown
6,896 Points

I had this issue and it was because I wasn't consistent with capitalizing Content v. content.