Which makes this historical footnote all the more intriguing in light of the fact that Mayor Bloomberg is aggressively wooing both national conventions to New York for 2008 : The last time a presidential candidate who was nominated in his home state got elected was 130 years ago , when Rutherford B. Hayes , of Ohio , in a disputed electoral count , edged out Samuel J. Tilden , a New Yorker who had won the popular vote .