{"action":"created","issue":{"url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/7","labels_url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/7/comments","events_url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/7/events","html_url":"https://github.com/NIT-Anan-Procon/rails_pokereg/issues/7","id":60302538,"number":7,"title":"特定のOwnerのThingsをRecipt経由で取得する方法","user":{"login":"tatkeshi","id":3395397,"avatar_url":"https://avatars.githubusercontent.com/u/3395397?v=3","gravatar_id":"","url":"https://api.github.com/users/tatkeshi","html_url":"https://github.com/tatkeshi","followers_url":"https://api.github.com/users/tatkeshi/followers","following_url":"https://api.github.com/users/tatkeshi/following{/other_user}","gists_url":"https://api.github.com/users/tatkeshi/gists{/gist_id}","starred_url":"https://api.github.com/users/tatkeshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatkeshi/subscriptions","organizations_url":"https://api.github.com/users/tatkeshi/orgs","repos_url":"https://api.github.com/users/tatkeshi/repos","events_url":"https://api.github.com/users/tatkeshi/events{/privacy}","received_events_url":"https://api.github.com/users/tatkeshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-09T06:03:16Z","updated_at":"2015-03-11T13:51:21Z","closed_at":null,"body":"関連が複雑になると、用意されているメソッドで対処できない。\r\n結局SQLのJOINなんかを考えないといけない。\r\nRailsは標準でArelというDBとのやりとりを抽象化するエンジンを使っていて、\r\nこれを使うことで複雑なやりとりも実現できるが、\r\nほとんどSQL書いてるのと代わらないかそれより複雑化するため少々周りくどい。\r\n\r\n実は生のSQLを書く方法がある。\r\n今回はArelを勉強している暇もないし、SQLの勉強のためにその方がいいかも。\r\n\r\n具体的な方法は後で示すとして、とりあえずSQLでどうすればいいか考えてみようか。\r\nまずはSQLITE3をインストールして、 db/developemnt.sqlite3に生SQLを送ってみよう"},"comment":{"url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/comments/78266040","html_url":"https://github.com/NIT-Anan-Procon/rails_pokereg/issues/7#issuecomment-78266040","issue_url":"https://api.github.com/repos/NIT-Anan-Procon/rails_pokereg/issues/7","id":78266040,"user":{"login":"haruka0000","id":8327769,"avatar_url":"https://avatars.githubusercontent.com/u/8327769?v=3","gravatar_id":"","url":"https://api.github.com/users/haruka0000","html_url":"https://github.com/haruka0000","followers_url":"https://api.github.com/users/haruka0000/followers","following_url":"https://api.github.com/users/haruka0000/following{/other_user}","gists_url":"https://api.github.com/users/haruka0000/gists{/gist_id}","starred_url":"https://api.github.com/users/haruka0000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haruka0000/subscriptions","organizations_url":"https://api.github.com/users/haruka0000/orgs","repos_url":"https://api.github.com/users/haruka0000/repos","events_url":"https://api.github.com/users/haruka0000/events{/privacy}","received_events_url":"https://api.github.com/users/haruka0000/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T13:51:21Z","updated_at":"2015-03-11T13:51:21Z","body":"![screenshot from 2015-03-11 22 48 30](https://cloud.githubusercontent.com/assets/8327769/6597543/ccafa576-c840-11e4-8de3-bf0ff78c5c4f.png)\r\nいけたっぽいです。一応レシートカラムも表示させてみました。\r\n\r\n\r\n![screenshot from 2015-03-11 22 48 45](https://cloud.githubusercontent.com/assets/8327769/6597565/f9d61b98-c840-11e4-9318-544601f8e00d.png)\r\n他のユーザーでログインすると、ちゃんと表示されない仕様になってます。\r\npushしておきます。"}}