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

Customizing forms - check in status

hello, I'm supposed to add the erb code if and else

this is what i did

<div class="status">
    <% if %>
    <span class="message">You are signed in.</span>
    <% else %>
    <span class="message">You are NOT signed in.</span>

</div>

what did i do wrong?

4 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

You'll need an if test of some sort, as well as a closing end tag:

<% if current_user %>
  <span>....
<% else %>
   <span>....
<% end %>

did THE Jason Seifer just respond to my inquiry? Thanks a lot for taking your time to do that my man, kind of like when the head chef of a nice restaurant comes out and gives you your food, even though he probably has a bunch of better things to do. Thanks for making the program, I'm learning tons.

m

by the way, I just went through your Accepting Friendships video, in Adding state, building social features through ruby on rails, and i laughed extremely hard from 12:48 to 3:04, thanks for the comedy and the entire program, you're really funny!