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

Profile Page not showing entire status

Hello,

I am doing the Treebook project and I am on this stage http://teamtreehouse.com/library/programming-2/build-a-simple-version-of-facebook/building-the-profile-page/testing-the-profiles-controller. Basically I got the profile page to work but it doesnt show the entire status. I get no errors, but it only shows the time the status was posted and not the actual status it self. I am using this code:

<div class="page-header"> <h1><%= @user.full_name %></h1> </div>

<% if @statuses %> <% @statuses.each do |status| %> <div class="well"> <% status.content %> <hr /> <%= link_to time_ago_in_words(status.created_at), status_path(status) %> ago </div> <% end %> <% end %>

Has anyone else come across this?

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Tel, you're missing an = sign. Make your code look like this:

<%= status.content %>

That tells Ruby to display the result rather than just evaluate the code in the erb blocks.