-<% if @user.new_messages.size > 0 %>
-<span id="inboxanchor" class="count-number"><%= @user.new_messages.size %></span>
+<% if current_user.new_messages.size > 0 %>
+<span id="inboxanchor" class="count-number"><%= current_user.new_messages.size %></span>
<% end %>