This week's Economist endorsement of Obama gives undeserved credit to John McCain for "having a better record on global warming than most Democrats." I've heard that before and it's not true.
In 2003, Joe Lieberman (who despite his many flaws, remains a good environmentalist) introduced the Climate Stewardship Act, meaning he was mainly responsible for moving the bill forward. McCain was just one of 9 co-sponsors. McCain's name got on the bill because they try to have both a Democrat and a Republican name, but it was still Lieberman's bill.
The bill ultimately failed to pass the Senate on a 43-55 vote, and most Democrats voted for it.
McCain's overrated willingness to buck his party is deserved in this one, very important issue, and for that he deserves credit. That doesn't make him better than most Democrats, though. I suppose he may have put more effort than most Democrats on this bill, but that's a pretty slim reed.