{"action":"created","comment":{"url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/22418128","id":22418128,"diff_hunk":"@@ -20,6 +21,7 @@ class Entry < ActiveRecord::Base\n \n   belongs_to :project, touch: true\n   belongs_to :category\n+  has_one :client, through: :project","path":"app/models/entry.rb","position":12,"original_position":12,"commit_id":"7ab21250a58ede4b7922c29c3330aff19503c7a3","original_commit_id":"7ab21250a58ede4b7922c29c3330aff19503c7a3","user":{"login":"Marthyn","id":642544,"avatar_url":"https://avatars.githubusercontent.com/u/642544?v=3","gravatar_id":"","url":"https://api.github.com/users/Marthyn","html_url":"https://github.com/Marthyn","followers_url":"https://api.github.com/users/Marthyn/followers","following_url":"https://api.github.com/users/Marthyn/following{/other_user}","gists_url":"https://api.github.com/users/Marthyn/gists{/gist_id}","starred_url":"https://api.github.com/users/Marthyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marthyn/subscriptions","organizations_url":"https://api.github.com/users/Marthyn/orgs","repos_url":"https://api.github.com/users/Marthyn/repos","events_url":"https://api.github.com/users/Marthyn/events{/privacy}","received_events_url":"https://api.github.com/users/Marthyn/received_events","type":"User","site_admin":false},"body":"A belongs to through is not possible. But maybe we should add client is on entry level\r\n\r\nSent from my iPhone\r\n\r\n> On 02 Jan 2015, at 19:37, Jurre <notifications@github.com> wrote:\r\n> \r\n> In app/models/entry.rb:\r\n> \r\n> > @@ -20,6 +21,7 @@ class Entry < ActiveRecord::Base\r\n> >  \r\n> >    belongs_to :project, touch: true\r\n> >    belongs_to :category\r\n> > +  has_one :client, through: :project\r\n> Shouldn't this be a belongs_to association?\r\n> \r\n> —\r\n> Reply to this email directly or view it on GitHub.\r\n> \r\n","created_at":"2015-01-02T18:42:09Z","updated_at":"2015-01-02T18:42:09Z","html_url":"https://github.com/DefactoSoftware/Hours/pull/229#discussion_r22418128","pull_request_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/22418128"},"html":{"href":"https://github.com/DefactoSoftware/Hours/pull/229#discussion_r22418128"},"pull_request":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229","id":26559504,"html_url":"https://github.com/DefactoSoftware/Hours/pull/229","diff_url":"https://github.com/DefactoSoftware/Hours/pull/229.diff","patch_url":"https://github.com/DefactoSoftware/Hours/pull/229.patch","issue_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/229","number":229,"state":"open","locked":false,"title":"[WIP] Billable hours overview","user":{"login":"Marthyn","id":642544,"avatar_url":"https://avatars.githubusercontent.com/u/642544?v=3","gravatar_id":"","url":"https://api.github.com/users/Marthyn","html_url":"https://github.com/Marthyn","followers_url":"https://api.github.com/users/Marthyn/followers","following_url":"https://api.github.com/users/Marthyn/following{/other_user}","gists_url":"https://api.github.com/users/Marthyn/gists{/gist_id}","starred_url":"https://api.github.com/users/Marthyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marthyn/subscriptions","organizations_url":"https://api.github.com/users/Marthyn/orgs","repos_url":"https://api.github.com/users/Marthyn/repos","events_url":"https://api.github.com/users/Marthyn/events{/privacy}","received_events_url":"https://api.github.com/users/Marthyn/received_events","type":"User","site_admin":false},"body":"- [x] Bill whole project\r\n- [x] Bill single entry\r\n- [x] Filter on client, project and dates\r\n- [ ] Filter on billed/not billed\r\n- [ ] Mobile\r\n- [ ] Caching/Pagination\r\n\r\n![screen shot 2015-01-02 at 16 36 42](https://cloud.githubusercontent.com/assets/642544/5597158/d6b803a2-929d-11e4-9ab4-ce67fcccaf4a.png)\r\n![screen shot 2015-01-02 at 16 36 52](https://cloud.githubusercontent.com/assets/642544/5597156/d6b562f0-929d-11e4-96b2-96c3c41b8d6e.png)\r\n![screen shot 2015-01-02 at 16 37 35](https://cloud.githubusercontent.com/assets/642544/5597157/d6b7f6d2-929d-11e4-8d73-9ba6b3990660.png)\r\n\r\n","created_at":"2014-12-24T13:54:51Z","updated_at":"2015-01-02T18:42:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26e8fcda8ebfba76bb6368a4dc7f9448d840d2e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229/commits","review_comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229/comments","review_comment_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/229/comments","statuses_url":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/7ab21250a58ede4b7922c29c3330aff19503c7a3","head":{"label":"DefactoSoftware:marthyn/billables","ref":"marthyn/billables","sha":"7ab21250a58ede4b7922c29c3330aff19503c7a3","user":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":17153103,"name":"Hours","full_name":"DefactoSoftware/Hours","owner":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefactoSoftware/Hours","description":"Time registration that doesn't suck","fork":false,"url":"https://api.github.com/repos/DefactoSoftware/Hours","forks_url":"https://api.github.com/repos/DefactoSoftware/Hours/forks","keys_url":"https://api.github.com/repos/DefactoSoftware/Hours/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefactoSoftware/Hours/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefactoSoftware/Hours/teams","hooks_url":"https://api.github.com/repos/DefactoSoftware/Hours/hooks","issue_events_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/events{/number}","events_url":"https://api.github.com/repos/DefactoSoftware/Hours/events","assignees_url":"https://api.github.com/repos/DefactoSoftware/Hours/assignees{/user}","branches_url":"https://api.github.com/repos/DefactoSoftware/Hours/branches{/branch}","tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/tags","blobs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/{sha}","languages_url":"https://api.github.com/repos/DefactoSoftware/Hours/languages","stargazers_url":"https://api.github.com/repos/DefactoSoftware/Hours/stargazers","contributors_url":"https://api.github.com/repos/DefactoSoftware/Hours/contributors","subscribers_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscribers","subscription_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscription","commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/comments/{number}","contents_url":"https://api.github.com/repos/DefactoSoftware/Hours/contents/{+path}","compare_url":"https://api.github.com/repos/DefactoSoftware/Hours/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefactoSoftware/Hours/merges","archive_url":"https://api.github.com/repos/DefactoSoftware/Hours/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefactoSoftware/Hours/downloads","issues_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues{/number}","pulls_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls{/number}","milestones_url":"https://api.github.com/repos/DefactoSoftware/Hours/milestones{/number}","notifications_url":"https://api.github.com/repos/DefactoSoftware/Hours/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefactoSoftware/Hours/labels{/name}","releases_url":"https://api.github.com/repos/DefactoSoftware/Hours/releases{/id}","created_at":"2014-02-24T22:25:47Z","updated_at":"2015-01-02T10:16:22Z","pushed_at":"2015-01-02T15:31:37Z","git_url":"git://github.com/DefactoSoftware/Hours.git","ssh_url":"git@github.com:DefactoSoftware/Hours.git","clone_url":"https://github.com/DefactoSoftware/Hours.git","svn_url":"https://github.com/DefactoSoftware/Hours","homepage":"https://happyhours.io","size":10152,"stargazers_count":523,"watchers_count":523,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":34,"forks":56,"open_issues":34,"watchers":523,"default_branch":"development"}},"base":{"label":"DefactoSoftware:development","ref":"development","sha":"65b2e05bd3bc53d51343e109f6ac3581d9610e10","user":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":17153103,"name":"Hours","full_name":"DefactoSoftware/Hours","owner":{"login":"DefactoSoftware","id":3899757,"avatar_url":"https://avatars.githubusercontent.com/u/3899757?v=3","gravatar_id":"","url":"https://api.github.com/users/DefactoSoftware","html_url":"https://github.com/DefactoSoftware","followers_url":"https://api.github.com/users/DefactoSoftware/followers","following_url":"https://api.github.com/users/DefactoSoftware/following{/other_user}","gists_url":"https://api.github.com/users/DefactoSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/DefactoSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefactoSoftware/subscriptions","organizations_url":"https://api.github.com/users/DefactoSoftware/orgs","repos_url":"https://api.github.com/users/DefactoSoftware/repos","events_url":"https://api.github.com/users/DefactoSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/DefactoSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefactoSoftware/Hours","description":"Time registration that doesn't suck","fork":false,"url":"https://api.github.com/repos/DefactoSoftware/Hours","forks_url":"https://api.github.com/repos/DefactoSoftware/Hours/forks","keys_url":"https://api.github.com/repos/DefactoSoftware/Hours/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefactoSoftware/Hours/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefactoSoftware/Hours/teams","hooks_url":"https://api.github.com/repos/DefactoSoftware/Hours/hooks","issue_events_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/events{/number}","events_url":"https://api.github.com/repos/DefactoSoftware/Hours/events","assignees_url":"https://api.github.com/repos/DefactoSoftware/Hours/assignees{/user}","branches_url":"https://api.github.com/repos/DefactoSoftware/Hours/branches{/branch}","tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/tags","blobs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/{sha}","languages_url":"https://api.github.com/repos/DefactoSoftware/Hours/languages","stargazers_url":"https://api.github.com/repos/DefactoSoftware/Hours/stargazers","contributors_url":"https://api.github.com/repos/DefactoSoftware/Hours/contributors","subscribers_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscribers","subscription_url":"https://api.github.com/repos/DefactoSoftware/Hours/subscription","commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefactoSoftware/Hours/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefactoSoftware/Hours/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues/comments/{number}","contents_url":"https://api.github.com/repos/DefactoSoftware/Hours/contents/{+path}","compare_url":"https://api.github.com/repos/DefactoSoftware/Hours/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefactoSoftware/Hours/merges","archive_url":"https://api.github.com/repos/DefactoSoftware/Hours/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefactoSoftware/Hours/downloads","issues_url":"https://api.github.com/repos/DefactoSoftware/Hours/issues{/number}","pulls_url":"https://api.github.com/repos/DefactoSoftware/Hours/pulls{/number}","milestones_url":"https://api.github.com/repos/DefactoSoftware/Hours/milestones{/number}","notifications_url":"https://api.github.com/repos/DefactoSoftware/Hours/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefactoSoftware/Hours/labels{/name}","releases_url":"https://api.github.com/repos/DefactoSoftware/Hours/releases{/id}","created_at":"2014-02-24T22:25:47Z","updated_at":"2015-01-02T10:16:22Z","pushed_at":"2015-01-02T15:31:37Z","git_url":"git://github.com/DefactoSoftware/Hours.git","ssh_url":"git@github.com:DefactoSoftware/Hours.git","clone_url":"https://github.com/DefactoSoftware/Hours.git","svn_url":"https://github.com/DefactoSoftware/Hours","homepage":"https://happyhours.io","size":10152,"stargazers_count":523,"watchers_count":523,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":34,"forks":56,"open_issues":34,"watchers":523,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229"},"html":{"href":"https://github.com/DefactoSoftware/Hours/pull/229"},"issue":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/issues/229"},"comments":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/DefactoSoftware/Hours/statuses/7ab21250a58ede4b7922c29c3330aff19503c7a3"}}}}