Please put parentheses around (logged_user.id == @user.id). Also, the same happens in get '/:id' - maybe use a helper?