{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/240","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project4","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/240/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/240/events","html_url":"https://github.com/ga-wdi-exercises/project4/issues/240","id":169936174,"number":240,"title":"Foreign keys with non-standard names","user":{"login":"kwg58","id":16903135,"avatar_url":"https://avatars.githubusercontent.com/u/16903135?v=3","gravatar_id":"","url":"https://api.github.com/users/kwg58","html_url":"https://github.com/kwg58","followers_url":"https://api.github.com/users/kwg58/followers","following_url":"https://api.github.com/users/kwg58/following{/other_user}","gists_url":"https://api.github.com/users/kwg58/gists{/gist_id}","starred_url":"https://api.github.com/users/kwg58/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwg58/subscriptions","organizations_url":"https://api.github.com/users/kwg58/orgs","repos_url":"https://api.github.com/users/kwg58/repos","events_url":"https://api.github.com/users/kwg58/events{/privacy}","received_events_url":"https://api.github.com/users/kwg58/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/labels/waiting-on-student-response","name":"waiting-on-student-response","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-08T14:25:23Z","updated_at":"2016-08-08T15:13:30Z","closed_at":null,"body":"In my games model I have two fields, hometeam_id and awayteam_id.  These are set up as foreign keys to the team model, but I can't get them to display the team name.  \r\n\r\nFor foreign keys using the team_id , I'd use something like game.team.fullname to get the team name, but it doesn't recognize game.hometeam_id.fullname.  \r\n\r\nThe only things I can find via Google refer to setting up the foreign keys, but say nothing about using them (plus they're all several years and a couple versions of Rails old).  \r\n\r\nDoes anyone have any experience using non-standard foreign key names in Rails?\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/comments/238268921","html_url":"https://github.com/ga-wdi-exercises/project4/issues/240#issuecomment-238268921","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/240","id":238268921,"user":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T15:13:30Z","updated_at":"2016-08-08T15:13:30Z","body":"try\r\n\r\n```rb\r\ndef hometeam()\r\n  Team.find(self.hometeam_id)\r\nend\r\n```"}}
{"actor":{"display_login":"jshawl"}}