{"action":"opened","number":70,"pull_request":{"url":"https://api.github.com/repos/Nuanda/plankrk/pulls/70","id":27096786,"html_url":"https://github.com/Nuanda/plankrk/pull/70","diff_url":"https://github.com/Nuanda/plankrk/pull/70.diff","patch_url":"https://github.com/Nuanda/plankrk/pull/70.patch","issue_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70","number":70,"state":"open","locked":false,"title":"basic comment model and recently_commented discussion scope","user":{"login":"Nuanda","id":107565,"avatar_url":"https://avatars.githubusercontent.com/u/107565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nuanda","html_url":"https://github.com/Nuanda","followers_url":"https://api.github.com/users/Nuanda/followers","following_url":"https://api.github.com/users/Nuanda/following{/other_user}","gists_url":"https://api.github.com/users/Nuanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nuanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nuanda/subscriptions","organizations_url":"https://api.github.com/users/Nuanda/orgs","repos_url":"https://api.github.com/users/Nuanda/repos","events_url":"https://api.github.com/users/Nuanda/events{/privacy}","received_events_url":"https://api.github.com/users/Nuanda/received_events","type":"User","site_admin":false},"body":"The interesting thing is inside Discussion.recently_commented.\r\n\r\nThe query we have works properly, but is not chainable - the count method used by specs is simply doing size/length on the result ruby array.\r\n\r\nThe commented out arel version does the same and is theoretically chainable (for instance, do recently_commented.limit(2) on it). However, count does not work since SQL is not able to count a select like that.\r\n\r\nThus - an interesting qrel/sql question :).","created_at":"2015-01-09T12:25:13Z","updated_at":"2015-01-09T12:25:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c16a85c18ad72c4b91272aeab155c0b8af68471","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Nuanda/plankrk/pulls/70/commits","review_comments_url":"https://api.github.com/repos/Nuanda/plankrk/pulls/70/comments","review_comment_url":"https://api.github.com/repos/Nuanda/plankrk/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70/comments","statuses_url":"https://api.github.com/repos/Nuanda/plankrk/statuses/7a4bfc776b30e0e264179e7814be538fc41c9d52","head":{"label":"Nuanda:comments_model","ref":"comments_model","sha":"7a4bfc776b30e0e264179e7814be538fc41c9d52","user":{"login":"Nuanda","id":107565,"avatar_url":"https://avatars.githubusercontent.com/u/107565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nuanda","html_url":"https://github.com/Nuanda","followers_url":"https://api.github.com/users/Nuanda/followers","following_url":"https://api.github.com/users/Nuanda/following{/other_user}","gists_url":"https://api.github.com/users/Nuanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nuanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nuanda/subscriptions","organizations_url":"https://api.github.com/users/Nuanda/orgs","repos_url":"https://api.github.com/users/Nuanda/repos","events_url":"https://api.github.com/users/Nuanda/events{/privacy}","received_events_url":"https://api.github.com/users/Nuanda/received_events","type":"User","site_admin":false},"repo":{"id":27176311,"name":"plankrk","full_name":"Nuanda/plankrk","owner":{"login":"Nuanda","id":107565,"avatar_url":"https://avatars.githubusercontent.com/u/107565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nuanda","html_url":"https://github.com/Nuanda","followers_url":"https://api.github.com/users/Nuanda/followers","following_url":"https://api.github.com/users/Nuanda/following{/other_user}","gists_url":"https://api.github.com/users/Nuanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nuanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nuanda/subscriptions","organizations_url":"https://api.github.com/users/Nuanda/orgs","repos_url":"https://api.github.com/users/Nuanda/repos","events_url":"https://api.github.com/users/Nuanda/events{/privacy}","received_events_url":"https://api.github.com/users/Nuanda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nuanda/plankrk","description":"An open data webapp for collaborative planning of city zoning. Applied to Kraków.","fork":false,"url":"https://api.github.com/repos/Nuanda/plankrk","forks_url":"https://api.github.com/repos/Nuanda/plankrk/forks","keys_url":"https://api.github.com/repos/Nuanda/plankrk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nuanda/plankrk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nuanda/plankrk/teams","hooks_url":"https://api.github.com/repos/Nuanda/plankrk/hooks","issue_events_url":"https://api.github.com/repos/Nuanda/plankrk/issues/events{/number}","events_url":"https://api.github.com/repos/Nuanda/plankrk/events","assignees_url":"https://api.github.com/repos/Nuanda/plankrk/assignees{/user}","branches_url":"https://api.github.com/repos/Nuanda/plankrk/branches{/branch}","tags_url":"https://api.github.com/repos/Nuanda/plankrk/tags","blobs_url":"https://api.github.com/repos/Nuanda/plankrk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nuanda/plankrk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nuanda/plankrk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nuanda/plankrk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nuanda/plankrk/statuses/{sha}","languages_url":"https://api.github.com/repos/Nuanda/plankrk/languages","stargazers_url":"https://api.github.com/repos/Nuanda/plankrk/stargazers","contributors_url":"https://api.github.com/repos/Nuanda/plankrk/contributors","subscribers_url":"https://api.github.com/repos/Nuanda/plankrk/subscribers","subscription_url":"https://api.github.com/repos/Nuanda/plankrk/subscription","commits_url":"https://api.github.com/repos/Nuanda/plankrk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nuanda/plankrk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nuanda/plankrk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nuanda/plankrk/issues/comments/{number}","contents_url":"https://api.github.com/repos/Nuanda/plankrk/contents/{+path}","compare_url":"https://api.github.com/repos/Nuanda/plankrk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nuanda/plankrk/merges","archive_url":"https://api.github.com/repos/Nuanda/plankrk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nuanda/plankrk/downloads","issues_url":"https://api.github.com/repos/Nuanda/plankrk/issues{/number}","pulls_url":"https://api.github.com/repos/Nuanda/plankrk/pulls{/number}","milestones_url":"https://api.github.com/repos/Nuanda/plankrk/milestones{/number}","notifications_url":"https://api.github.com/repos/Nuanda/plankrk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nuanda/plankrk/labels{/name}","releases_url":"https://api.github.com/repos/Nuanda/plankrk/releases{/id}","created_at":"2014-11-26T12:43:01Z","updated_at":"2015-01-09T11:38:01Z","pushed_at":"2015-01-09T12:21:10Z","git_url":"git://github.com/Nuanda/plankrk.git","ssh_url":"git@github.com:Nuanda/plankrk.git","clone_url":"https://github.com/Nuanda/plankrk.git","svn_url":"https://github.com/Nuanda/plankrk","homepage":null,"size":1460,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"Nuanda:master","ref":"master","sha":"eac1cc9b058e39f0533a8769933a9a3cd6baae1e","user":{"login":"Nuanda","id":107565,"avatar_url":"https://avatars.githubusercontent.com/u/107565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nuanda","html_url":"https://github.com/Nuanda","followers_url":"https://api.github.com/users/Nuanda/followers","following_url":"https://api.github.com/users/Nuanda/following{/other_user}","gists_url":"https://api.github.com/users/Nuanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nuanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nuanda/subscriptions","organizations_url":"https://api.github.com/users/Nuanda/orgs","repos_url":"https://api.github.com/users/Nuanda/repos","events_url":"https://api.github.com/users/Nuanda/events{/privacy}","received_events_url":"https://api.github.com/users/Nuanda/received_events","type":"User","site_admin":false},"repo":{"id":27176311,"name":"plankrk","full_name":"Nuanda/plankrk","owner":{"login":"Nuanda","id":107565,"avatar_url":"https://avatars.githubusercontent.com/u/107565?v=3","gravatar_id":"","url":"https://api.github.com/users/Nuanda","html_url":"https://github.com/Nuanda","followers_url":"https://api.github.com/users/Nuanda/followers","following_url":"https://api.github.com/users/Nuanda/following{/other_user}","gists_url":"https://api.github.com/users/Nuanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nuanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nuanda/subscriptions","organizations_url":"https://api.github.com/users/Nuanda/orgs","repos_url":"https://api.github.com/users/Nuanda/repos","events_url":"https://api.github.com/users/Nuanda/events{/privacy}","received_events_url":"https://api.github.com/users/Nuanda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nuanda/plankrk","description":"An open data webapp for collaborative planning of city zoning. Applied to Kraków.","fork":false,"url":"https://api.github.com/repos/Nuanda/plankrk","forks_url":"https://api.github.com/repos/Nuanda/plankrk/forks","keys_url":"https://api.github.com/repos/Nuanda/plankrk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nuanda/plankrk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nuanda/plankrk/teams","hooks_url":"https://api.github.com/repos/Nuanda/plankrk/hooks","issue_events_url":"https://api.github.com/repos/Nuanda/plankrk/issues/events{/number}","events_url":"https://api.github.com/repos/Nuanda/plankrk/events","assignees_url":"https://api.github.com/repos/Nuanda/plankrk/assignees{/user}","branches_url":"https://api.github.com/repos/Nuanda/plankrk/branches{/branch}","tags_url":"https://api.github.com/repos/Nuanda/plankrk/tags","blobs_url":"https://api.github.com/repos/Nuanda/plankrk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nuanda/plankrk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nuanda/plankrk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nuanda/plankrk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nuanda/plankrk/statuses/{sha}","languages_url":"https://api.github.com/repos/Nuanda/plankrk/languages","stargazers_url":"https://api.github.com/repos/Nuanda/plankrk/stargazers","contributors_url":"https://api.github.com/repos/Nuanda/plankrk/contributors","subscribers_url":"https://api.github.com/repos/Nuanda/plankrk/subscribers","subscription_url":"https://api.github.com/repos/Nuanda/plankrk/subscription","commits_url":"https://api.github.com/repos/Nuanda/plankrk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nuanda/plankrk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nuanda/plankrk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nuanda/plankrk/issues/comments/{number}","contents_url":"https://api.github.com/repos/Nuanda/plankrk/contents/{+path}","compare_url":"https://api.github.com/repos/Nuanda/plankrk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nuanda/plankrk/merges","archive_url":"https://api.github.com/repos/Nuanda/plankrk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nuanda/plankrk/downloads","issues_url":"https://api.github.com/repos/Nuanda/plankrk/issues{/number}","pulls_url":"https://api.github.com/repos/Nuanda/plankrk/pulls{/number}","milestones_url":"https://api.github.com/repos/Nuanda/plankrk/milestones{/number}","notifications_url":"https://api.github.com/repos/Nuanda/plankrk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nuanda/plankrk/labels{/name}","releases_url":"https://api.github.com/repos/Nuanda/plankrk/releases{/id}","created_at":"2014-11-26T12:43:01Z","updated_at":"2015-01-09T11:38:01Z","pushed_at":"2015-01-09T12:21:10Z","git_url":"git://github.com/Nuanda/plankrk.git","ssh_url":"git@github.com:Nuanda/plankrk.git","clone_url":"https://github.com/Nuanda/plankrk.git","svn_url":"https://github.com/Nuanda/plankrk","homepage":null,"size":1460,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nuanda/plankrk/pulls/70"},"html":{"href":"https://github.com/Nuanda/plankrk/pull/70"},"issue":{"href":"https://api.github.com/repos/Nuanda/plankrk/issues/70"},"comments":{"href":"https://api.github.com/repos/Nuanda/plankrk/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/Nuanda/plankrk/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/Nuanda/plankrk/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Nuanda/plankrk/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/Nuanda/plankrk/statuses/7a4bfc776b30e0e264179e7814be538fc41c9d52"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":139,"deletions":14,"changed_files":9}}