{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_60/pulls/comments/34437042","id":34437042,"diff_hunk":"@@ -8,7 +8,14 @@ class Word < ActiveRecord::Base\n \n   validates :content, presence: true\n \n+  scope :learned, ->user{where id: Answer.select(:word_id ).\n+    where(\"lesson_id  IN (?) and option_id is not null\", user.lessons.ids)}\n+  scope :not_learned, ->user{where id: Answer.select(:word_id).","path":"app/models/word.rb","position":6,"original_position":6,"commit_id":"d9983580ba200751875f986ba85fc8c024cb4824","original_commit_id":"d9983580ba200751875f986ba85fc8c024cb4824","user":{"login":"dieunb","id":2122175,"avatar_url":"https://avatars.githubusercontent.com/u/2122175?v=3","gravatar_id":"","url":"https://api.github.com/users/dieunb","html_url":"https://github.com/dieunb","followers_url":"https://api.github.com/users/dieunb/followers","following_url":"https://api.github.com/users/dieunb/following{/other_user}","gists_url":"https://api.github.com/users/dieunb/gists{/gist_id}","starred_url":"https://api.github.com/users/dieunb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dieunb/subscriptions","organizations_url":"https://api.github.com/users/dieunb/orgs","repos_url":"https://api.github.com/users/dieunb/repos","events_url":"https://api.github.com/users/dieunb/events{/privacy}","received_events_url":"https://api.github.com/users/dieunb/received_events","type":"User","site_admin":false},"body":"Sub query ","created_at":"2015-07-13T06:59:37Z","updated_at":"2015-07-13T06:59:37Z","html_url":"https://github.com/framgia/fels_60/pull/21#discussion_r34437042","pull_request_url":"https://api.github.com/repos/framgia/fels_60/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/comments/34437042"},"html":{"href":"https://github.com/framgia/fels_60/pull/21#discussion_r34437042"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_60/pulls/21","id":39436856,"html_url":"https://github.com/framgia/fels_60/pull/21","diff_url":"https://github.com/framgia/fels_60/pull/21.diff","patch_url":"https://github.com/framgia/fels_60/pull/21.patch","issue_url":"https://api.github.com/repos/framgia/fels_60/issues/21","number":21,"state":"open","locked":false,"title":"Finish show words","user":{"login":"vietanhbkaaa","id":12491647,"avatar_url":"https://avatars.githubusercontent.com/u/12491647?v=3","gravatar_id":"","url":"https://api.github.com/users/vietanhbkaaa","html_url":"https://github.com/vietanhbkaaa","followers_url":"https://api.github.com/users/vietanhbkaaa/followers","following_url":"https://api.github.com/users/vietanhbkaaa/following{/other_user}","gists_url":"https://api.github.com/users/vietanhbkaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/vietanhbkaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietanhbkaaa/subscriptions","organizations_url":"https://api.github.com/users/vietanhbkaaa/orgs","repos_url":"https://api.github.com/users/vietanhbkaaa/repos","events_url":"https://api.github.com/users/vietanhbkaaa/events{/privacy}","received_events_url":"https://api.github.com/users/vietanhbkaaa/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-08T02:46:13Z","updated_at":"2015-07-13T06:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99aff3ff9e16f6a3b5fd52185d51cda4adb46f06","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_60/pulls/21/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_60/pulls/21/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_60/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_60/issues/21/comments","statuses_url":"https://api.github.com/repos/framgia/fels_60/statuses/d9983580ba200751875f986ba85fc8c024cb4824","head":{"label":"vietanhbkaaa:show-word","ref":"show-word","sha":"d9983580ba200751875f986ba85fc8c024cb4824","user":{"login":"vietanhbkaaa","id":12491647,"avatar_url":"https://avatars.githubusercontent.com/u/12491647?v=3","gravatar_id":"","url":"https://api.github.com/users/vietanhbkaaa","html_url":"https://github.com/vietanhbkaaa","followers_url":"https://api.github.com/users/vietanhbkaaa/followers","following_url":"https://api.github.com/users/vietanhbkaaa/following{/other_user}","gists_url":"https://api.github.com/users/vietanhbkaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/vietanhbkaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietanhbkaaa/subscriptions","organizations_url":"https://api.github.com/users/vietanhbkaaa/orgs","repos_url":"https://api.github.com/users/vietanhbkaaa/repos","events_url":"https://api.github.com/users/vietanhbkaaa/events{/privacy}","received_events_url":"https://api.github.com/users/vietanhbkaaa/received_events","type":"User","site_admin":false},"repo":{"id":38021352,"name":"fels_60","full_name":"vietanhbkaaa/fels_60","owner":{"login":"vietanhbkaaa","id":12491647,"avatar_url":"https://avatars.githubusercontent.com/u/12491647?v=3","gravatar_id":"","url":"https://api.github.com/users/vietanhbkaaa","html_url":"https://github.com/vietanhbkaaa","followers_url":"https://api.github.com/users/vietanhbkaaa/followers","following_url":"https://api.github.com/users/vietanhbkaaa/following{/other_user}","gists_url":"https://api.github.com/users/vietanhbkaaa/gists{/gist_id}","starred_url":"https://api.github.com/users/vietanhbkaaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietanhbkaaa/subscriptions","organizations_url":"https://api.github.com/users/vietanhbkaaa/orgs","repos_url":"https://api.github.com/users/vietanhbkaaa/repos","events_url":"https://api.github.com/users/vietanhbkaaa/events{/privacy}","received_events_url":"https://api.github.com/users/vietanhbkaaa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vietanhbkaaa/fels_60","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/vietanhbkaaa/fels_60","forks_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/forks","keys_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/teams","hooks_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/hooks","issue_events_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/issues/events{/number}","events_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/events","assignees_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/assignees{/user}","branches_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/branches{/branch}","tags_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/tags","blobs_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/git/refs{/sha}","trees_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/statuses/{sha}","languages_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/languages","stargazers_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/stargazers","contributors_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/contributors","subscribers_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/subscribers","subscription_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/subscription","commits_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/commits{/sha}","git_commits_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/git/commits{/sha}","comments_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/comments{/number}","issue_comment_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/issues/comments{/number}","contents_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/contents/{+path}","compare_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/merges","archive_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/downloads","issues_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/issues{/number}","pulls_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/pulls{/number}","milestones_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/milestones{/number}","notifications_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/labels{/name}","releases_url":"https://api.github.com/repos/vietanhbkaaa/fels_60/releases{/id}","created_at":"2015-06-25T01:43:03Z","updated_at":"2015-06-16T07:42:34Z","pushed_at":"2015-07-13T06:50:31Z","git_url":"git://github.com/vietanhbkaaa/fels_60.git","ssh_url":"git@github.com:vietanhbkaaa/fels_60.git","clone_url":"https://github.com/vietanhbkaaa/fels_60.git","svn_url":"https://github.com/vietanhbkaaa/fels_60","homepage":null,"size":253,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"566cc64848c8951bd9c297a853c31089d7bf6122","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":37515705,"name":"fels_60","full_name":"framgia/fels_60","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_60","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_60","forks_url":"https://api.github.com/repos/framgia/fels_60/forks","keys_url":"https://api.github.com/repos/framgia/fels_60/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_60/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_60/teams","hooks_url":"https://api.github.com/repos/framgia/fels_60/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_60/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_60/events","assignees_url":"https://api.github.com/repos/framgia/fels_60/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_60/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_60/tags","blobs_url":"https://api.github.com/repos/framgia/fels_60/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_60/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_60/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_60/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_60/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_60/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_60/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_60/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_60/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_60/subscription","commits_url":"https://api.github.com/repos/framgia/fels_60/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_60/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_60/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_60/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_60/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_60/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_60/merges","archive_url":"https://api.github.com/repos/framgia/fels_60/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_60/downloads","issues_url":"https://api.github.com/repos/framgia/fels_60/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_60/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_60/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_60/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_60/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_60/releases{/id}","created_at":"2015-06-16T07:42:34Z","updated_at":"2015-06-16T07:42:34Z","pushed_at":"2015-07-13T06:50:32Z","git_url":"git://github.com/framgia/fels_60.git","ssh_url":"git@github.com:framgia/fels_60.git","clone_url":"https://github.com/framgia/fels_60.git","svn_url":"https://github.com/framgia/fels_60","homepage":null,"size":519,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/21"},"html":{"href":"https://github.com/framgia/fels_60/pull/21"},"issue":{"href":"https://api.github.com/repos/framgia/fels_60/issues/21"},"comments":{"href":"https://api.github.com/repos/framgia/fels_60/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_60/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_60/statuses/d9983580ba200751875f986ba85fc8c024cb4824"}}}}