{"action":"created","issue":{"url":"https://api.github.com/repos/Nuanda/plankrk/issues/70","labels_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70/comments","events_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70/events","html_url":"https://github.com/Nuanda/plankrk/pull/70","id":53862843,"number":70,"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},"labels":[{"url":"https://api.github.com/repos/Nuanda/plankrk/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/Nuanda/plankrk/labels/ready+for+review","name":"ready for review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-09T12:25:13Z","updated_at":"2015-01-11T15:38:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Nuanda/plankrk/pulls/70","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"},"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 arel/sql question :)."},"comment":{"url":"https://api.github.com/repos/Nuanda/plankrk/issues/comments/69498461","html_url":"https://github.com/Nuanda/plankrk/pull/70#issuecomment-69498461","issue_url":"https://api.github.com/repos/Nuanda/plankrk/issues/70","id":69498461,"user":{"login":"mkasztelnik","id":1265430,"avatar_url":"https://avatars.githubusercontent.com/u/1265430?v=3","gravatar_id":"","url":"https://api.github.com/users/mkasztelnik","html_url":"https://github.com/mkasztelnik","followers_url":"https://api.github.com/users/mkasztelnik/followers","following_url":"https://api.github.com/users/mkasztelnik/following{/other_user}","gists_url":"https://api.github.com/users/mkasztelnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mkasztelnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkasztelnik/subscriptions","organizations_url":"https://api.github.com/users/mkasztelnik/orgs","repos_url":"https://api.github.com/users/mkasztelnik/repos","events_url":"https://api.github.com/users/mkasztelnik/events{/privacy}","received_events_url":"https://api.github.com/users/mkasztelnik/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T15:38:45Z","updated_at":"2015-01-11T15:38:45Z","body":"I posted small remarks, but generally :+1: good job :smile: "}}