The preferred way of phrasing this is either `if current_user` or `if user_logged_in?`.  The current line is in a javascript-like style.