app/models/twitter_auth/oauth_user.rb in twitter-auth-0.1.5 vs app/models/twitter_auth/oauth_user.rb in twitter-auth-0.1.7

- old
+ new

@@ -13,10 +13,13 @@ raise ArgumentError, 'Must authenticate with an OAuth::AccessToken or the string access token and secret.' unless (token && secret) || token.is_a?(OAuth::AccessToken) user_info = JSON.parse(token.get('/account/verify_credentials.json').body) if user = User.find_by_login(user_info['screen_name']) - user.update_twitter_attributes(user_info) + user.assign_twitter_attributes(user_info) + user.access_token = token.token + user.access_secret = token.secret + user.save user else User.create_from_twitter_hash_and_token(user_info, token) end end