{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_28/pulls/comments/26275317","id":26275317,"diff_hunk":"@@ -3,6 +3,9 @@ class Word < ActiveRecord::Base\n \n   has_many :learned_words, dependent: :destroy\n   has_many :choices, dependent: :destroy\n+  \n+  scope :not_learned_in_course, ->(learned_words_id, course_id) {\n+    where(\"course_id = #{course_id} and id not in (#{learned_words_id})\") }","path":"app/models/word.rb","position":6,"original_position":6,"commit_id":"daea28b1665ea8243017fd36b5725001241a401e","original_commit_id":"daea28b1665ea8243017fd36b5725001241a401e","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":"```\r\n{where(\"course_id = #{course_id} and id not in (#{learned_words_id})\")}\r\n```","created_at":"2015-03-12T03:05:40Z","updated_at":"2015-03-12T03:05:40Z","html_url":"https://github.com/framgia/fels_28/pull/10#discussion_r26275317","pull_request_url":"https://api.github.com/repos/framgia/fels_28/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/comments/26275317"},"html":{"href":"https://github.com/framgia/fels_28/pull/10#discussion_r26275317"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_28/pulls/10","id":30353995,"html_url":"https://github.com/framgia/fels_28/pull/10","diff_url":"https://github.com/framgia/fels_28/pull/10.diff","patch_url":"https://github.com/framgia/fels_28/pull/10.patch","issue_url":"https://api.github.com/repos/framgia/fels_28/issues/10","number":10,"state":"open","locked":false,"title":"Rework words filter, add collum translation to table words","user":{"login":"hieuns","id":6816517,"avatar_url":"https://avatars.githubusercontent.com/u/6816517?v=3","gravatar_id":"","url":"https://api.github.com/users/hieuns","html_url":"https://github.com/hieuns","followers_url":"https://api.github.com/users/hieuns/followers","following_url":"https://api.github.com/users/hieuns/following{/other_user}","gists_url":"https://api.github.com/users/hieuns/gists{/gist_id}","starred_url":"https://api.github.com/users/hieuns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieuns/subscriptions","organizations_url":"https://api.github.com/users/hieuns/orgs","repos_url":"https://api.github.com/users/hieuns/repos","events_url":"https://api.github.com/users/hieuns/events{/privacy}","received_events_url":"https://api.github.com/users/hieuns/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-03T08:15:37Z","updated_at":"2015-03-12T03:05:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb5d876539e72bb99358f2525b746e7491224fdb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_28/pulls/10/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_28/pulls/10/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_28/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_28/issues/10/comments","statuses_url":"https://api.github.com/repos/framgia/fels_28/statuses/daea28b1665ea8243017fd36b5725001241a401e","head":{"label":"hieuns:rework-word-filter","ref":"rework-word-filter","sha":"daea28b1665ea8243017fd36b5725001241a401e","user":{"login":"hieuns","id":6816517,"avatar_url":"https://avatars.githubusercontent.com/u/6816517?v=3","gravatar_id":"","url":"https://api.github.com/users/hieuns","html_url":"https://github.com/hieuns","followers_url":"https://api.github.com/users/hieuns/followers","following_url":"https://api.github.com/users/hieuns/following{/other_user}","gists_url":"https://api.github.com/users/hieuns/gists{/gist_id}","starred_url":"https://api.github.com/users/hieuns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieuns/subscriptions","organizations_url":"https://api.github.com/users/hieuns/orgs","repos_url":"https://api.github.com/users/hieuns/repos","events_url":"https://api.github.com/users/hieuns/events{/privacy}","received_events_url":"https://api.github.com/users/hieuns/received_events","type":"User","site_admin":false},"repo":{"id":30003132,"name":"fels_28","full_name":"hieuns/fels_28","owner":{"login":"hieuns","id":6816517,"avatar_url":"https://avatars.githubusercontent.com/u/6816517?v=3","gravatar_id":"","url":"https://api.github.com/users/hieuns","html_url":"https://github.com/hieuns","followers_url":"https://api.github.com/users/hieuns/followers","following_url":"https://api.github.com/users/hieuns/following{/other_user}","gists_url":"https://api.github.com/users/hieuns/gists{/gist_id}","starred_url":"https://api.github.com/users/hieuns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieuns/subscriptions","organizations_url":"https://api.github.com/users/hieuns/orgs","repos_url":"https://api.github.com/users/hieuns/repos","events_url":"https://api.github.com/users/hieuns/events{/privacy}","received_events_url":"https://api.github.com/users/hieuns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hieuns/fels_28","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/hieuns/fels_28","forks_url":"https://api.github.com/repos/hieuns/fels_28/forks","keys_url":"https://api.github.com/repos/hieuns/fels_28/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hieuns/fels_28/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hieuns/fels_28/teams","hooks_url":"https://api.github.com/repos/hieuns/fels_28/hooks","issue_events_url":"https://api.github.com/repos/hieuns/fels_28/issues/events{/number}","events_url":"https://api.github.com/repos/hieuns/fels_28/events","assignees_url":"https://api.github.com/repos/hieuns/fels_28/assignees{/user}","branches_url":"https://api.github.com/repos/hieuns/fels_28/branches{/branch}","tags_url":"https://api.github.com/repos/hieuns/fels_28/tags","blobs_url":"https://api.github.com/repos/hieuns/fels_28/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hieuns/fels_28/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hieuns/fels_28/git/refs{/sha}","trees_url":"https://api.github.com/repos/hieuns/fels_28/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hieuns/fels_28/statuses/{sha}","languages_url":"https://api.github.com/repos/hieuns/fels_28/languages","stargazers_url":"https://api.github.com/repos/hieuns/fels_28/stargazers","contributors_url":"https://api.github.com/repos/hieuns/fels_28/contributors","subscribers_url":"https://api.github.com/repos/hieuns/fels_28/subscribers","subscription_url":"https://api.github.com/repos/hieuns/fels_28/subscription","commits_url":"https://api.github.com/repos/hieuns/fels_28/commits{/sha}","git_commits_url":"https://api.github.com/repos/hieuns/fels_28/git/commits{/sha}","comments_url":"https://api.github.com/repos/hieuns/fels_28/comments{/number}","issue_comment_url":"https://api.github.com/repos/hieuns/fels_28/issues/comments{/number}","contents_url":"https://api.github.com/repos/hieuns/fels_28/contents/{+path}","compare_url":"https://api.github.com/repos/hieuns/fels_28/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hieuns/fels_28/merges","archive_url":"https://api.github.com/repos/hieuns/fels_28/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hieuns/fels_28/downloads","issues_url":"https://api.github.com/repos/hieuns/fels_28/issues{/number}","pulls_url":"https://api.github.com/repos/hieuns/fels_28/pulls{/number}","milestones_url":"https://api.github.com/repos/hieuns/fels_28/milestones{/number}","notifications_url":"https://api.github.com/repos/hieuns/fels_28/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hieuns/fels_28/labels{/name}","releases_url":"https://api.github.com/repos/hieuns/fels_28/releases{/id}","created_at":"2015-01-29T04:12:13Z","updated_at":"2015-01-24T11:59:09Z","pushed_at":"2015-03-12T03:03:51Z","git_url":"git://github.com/hieuns/fels_28.git","ssh_url":"git@github.com:hieuns/fels_28.git","clone_url":"https://github.com/hieuns/fels_28.git","svn_url":"https://github.com/hieuns/fels_28","homepage":null,"size":224,"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":"722487a9907357a5fe7bf326c2553a01e763eab6","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":29775134,"name":"fels_28","full_name":"framgia/fels_28","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_28","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_28","forks_url":"https://api.github.com/repos/framgia/fels_28/forks","keys_url":"https://api.github.com/repos/framgia/fels_28/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_28/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_28/teams","hooks_url":"https://api.github.com/repos/framgia/fels_28/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_28/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_28/events","assignees_url":"https://api.github.com/repos/framgia/fels_28/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_28/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_28/tags","blobs_url":"https://api.github.com/repos/framgia/fels_28/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_28/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_28/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_28/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_28/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_28/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_28/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_28/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_28/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_28/subscription","commits_url":"https://api.github.com/repos/framgia/fels_28/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_28/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_28/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_28/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_28/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_28/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_28/merges","archive_url":"https://api.github.com/repos/framgia/fels_28/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_28/downloads","issues_url":"https://api.github.com/repos/framgia/fels_28/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_28/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_28/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_28/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_28/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_28/releases{/id}","created_at":"2015-01-24T11:59:09Z","updated_at":"2015-01-24T11:59:09Z","pushed_at":"2015-03-03T04:29:51Z","git_url":"git://github.com/framgia/fels_28.git","ssh_url":"git@github.com:framgia/fels_28.git","clone_url":"https://github.com/framgia/fels_28.git","svn_url":"https://github.com/framgia/fels_28","homepage":null,"size":358,"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":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/10"},"html":{"href":"https://github.com/framgia/fels_28/pull/10"},"issue":{"href":"https://api.github.com/repos/framgia/fels_28/issues/10"},"comments":{"href":"https://api.github.com/repos/framgia/fels_28/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_28/statuses/daea28b1665ea8243017fd36b5725001241a401e"}}}}