Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.