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!
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
André Hatlo-Johnsen1,170 Points
Cant understand what objects it wants
<%= form_for(@pet) do |f| %> <div class="field"> <%= f.field :name %> <%= f.text_area :name %> </div> <div> <%= f.submit %> </div> <% end %>
No, my earlier answer was almost correct. You need to read the challenge questions closely, which I did this time. It just wants a simple form. Besides the (), there is no need to add <div> tags here.
Here's my final passing code for this challenge:
<%= form_for @pet do |f| %> <%= f.label :name, 'Name' %> <%= f.text_field :name %> <%= f.submit %> <% end %>
I usually name my labels -- which I did here with 'Name'. However, this should still work if you want to leave that off.
<%= form_for @pet do |f| %> <%= f.label :name %> <%= f.text_field :name %> <%= f.submit %> <% end %>