{"action":"opened","issue":{"url":"https://api.github.com/repos/mkdynamic/omniauth-facebook/issues/305","repository_url":"https://api.github.com/repos/mkdynamic/omniauth-facebook","labels_url":"https://api.github.com/repos/mkdynamic/omniauth-facebook/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/mkdynamic/omniauth-facebook/issues/305/comments","events_url":"https://api.github.com/repos/mkdynamic/omniauth-facebook/issues/305/events","html_url":"https://github.com/mkdynamic/omniauth-facebook/issues/305","id":345549053,"node_id":"MDU6SXNzdWUzNDU1NDkwNTM=","number":305,"title":"How to save an avatar with Active Storage","user":{"login":"alexeyshchepin","id":1416217,"node_id":"MDQ6VXNlcjE0MTYyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1416217?v=4","gravatar_id":"","url":"https://api.github.com/users/alexeyshchepin","html_url":"https://github.com/alexeyshchepin","followers_url":"https://api.github.com/users/alexeyshchepin/followers","following_url":"https://api.github.com/users/alexeyshchepin/following{/other_user}","gists_url":"https://api.github.com/users/alexeyshchepin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeyshchepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeyshchepin/subscriptions","organizations_url":"https://api.github.com/users/alexeyshchepin/orgs","repos_url":"https://api.github.com/users/alexeyshchepin/repos","events_url":"https://api.github.com/users/alexeyshchepin/events{/privacy}","received_events_url":"https://api.github.com/users/alexeyshchepin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-29T17:46:58Z","updated_at":"2018-07-29T17:46:58Z","closed_at":null,"author_association":"NONE","body":"Hey folks!\r\nCan anybody advise me how to save an avatar from facebook to Active Storage?\r\n\r\nI've tried those two ways. But none of them works\r\n```ruby\r\nuser.avatar = auth.info.image\r\n# neither\r\ndownloaded_image = open(auth.info.image)\r\nuser.avatar.attach(io: downloaded_image, filename: 'avatar.jpg', content_type: 'image/jpg')\r\n```\r\n\r\nThank you!"}}
{"actor":{"display_login":"alexeyshchepin"}}