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 trialMikhail Dubov
Courses Plus Student 1,924 PointsWhy this code fails
<div class="page-header"> <h1>All Statuses</h1> </div>
<% @statuses.each do |status| %>
<div class="status"> <h2> <% status.name %> </h2> <p> </p> </div> <% end %>
Says Make sure status.name is inside the h2 tag. It obviously is. This is for q2 out of 3.
1 Answer
Jason Seifer
Treehouse Guest TeacherHey Mikhail Dubov! The code fails because it needs to look like this:
<%= status.name %>
That equals sign tells it to print out the result.