{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/31975","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/31975/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/31975/comments","events_url":"https://api.github.com/repos/rails/rails/issues/31975/events","html_url":"https://github.com/rails/rails/issues/31975","id":296547134,"number":31975,"title":"has_one through not available on unpersisted instances","user":{"login":"zachwalton","id":303729,"avatar_url":"https://avatars3.githubusercontent.com/u/303729?v=4","gravatar_id":"","url":"https://api.github.com/users/zachwalton","html_url":"https://github.com/zachwalton","followers_url":"https://api.github.com/users/zachwalton/followers","following_url":"https://api.github.com/users/zachwalton/following{/other_user}","gists_url":"https://api.github.com/users/zachwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/zachwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachwalton/subscriptions","organizations_url":"https://api.github.com/users/zachwalton/orgs","repos_url":"https://api.github.com/users/zachwalton/repos","events_url":"https://api.github.com/users/zachwalton/events{/privacy}","received_events_url":"https://api.github.com/users/zachwalton/received_events","type":"User","site_admin":false},"labels":[{"id":12449438,"url":"https://api.github.com/repos/rails/rails/labels/stale","name":"stale","color":"444444","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-12T22:27:43Z","updated_at":"2018-05-28T07:13:48Z","closed_at":null,"author_association":"NONE","body":"Note: I believe the way that this works is by associating with post_id, so if that's the case it makes sense that this would be the behavior, and I suppose this becomes an enhancement request.\r\n\r\n`Comment` knows that it has a `Post` associated with it as evidenced by the passed assertion on L66, so is it possible to leverage that relationship to make the `through` association work?\r\n\r\n### Steps to reproduce\r\n\r\nScript to reproduce: https://gist.github.com/zachwalton/395412f5b7e97837e6273981dbb7faf3\r\n\r\n### Expected behavior\r\n\r\n`owner` should be not be nil when accessed through the `has_one through` association\r\n\r\n### Actual behavior\r\n\r\n`owner` is nil when accessed through the `has_one through` association\r\n\r\n### System configuration\r\n**Rails version**: 5.1.2\r\n\r\n**Ruby version**: 2.4.2\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/392440294","html_url":"https://github.com/rails/rails/issues/31975#issuecomment-392440294","issue_url":"https://api.github.com/repos/rails/rails/issues/31975","id":392440294,"user":{"login":"rails-bot[bot]","id":28418009,"avatar_url":"https://avatars0.githubusercontent.com/in/2272?v=4","gravatar_id":"","url":"https://api.github.com/users/rails-bot%5Bbot%5D","html_url":"https://github.com/apps/rails-bot","followers_url":"https://api.github.com/users/rails-bot%5Bbot%5D/followers","following_url":"https://api.github.com/users/rails-bot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/rails-bot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-bot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-bot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/rails-bot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/rails-bot%5Bbot%5D/repos","events_url":"https://api.github.com/users/rails-bot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/rails-bot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-05-28T07:13:48Z","updated_at":"2018-05-28T07:13:48Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not been commented on for at least three months.\nThe resources of the Rails team are limited, and so we are asking for your help.\nIf you can still reproduce this error on the `5-2-stable` branch or on `master`, please reply with all of the information you have about it in order to keep the issue open.\nThank you for all your contributions.\n"}}
{"actor":{"display_login":"rails-bot"}}