Skip to content

Instantly share code, notes, and snippets.

@zackshapiro
Last active August 29, 2015 14:09
Show Gist options
  • Save zackshapiro/09bff2e2903e4a09bc64 to your computer and use it in GitHub Desktop.
Save zackshapiro/09bff2e2903e4a09bc64 to your computer and use it in GitHub Desktop.
# /app/models/user.rb
def update_credentials(client)
new_client = client.refresh!
update(access_token: new_client.token, refresh_token: new_client.refresh_token)
self
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment