{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_28/pulls/comments/26289568","id":26289568,"diff_hunk":"@@ -65,26 +65,35 @@ def following?(other_user)\n   end  \n \n   def num_of_learned_words\n-    lessons_id = Lesson.learned_by_user(id).pluck(:id)\n-    LearnedWord.in_lessons(lessons_id).count\n+    lessons_ids = lessons.pluck :id","path":"app/models/user.rb","position":6,"original_position":6,"commit_id":"e43e4b90def52fef89af2a9f72f74667b2f080b9","original_commit_id":"e43e4b90def52fef89af2a9f72f74667b2f080b9","user":{"login":"ngocthoaia1","id":4956441,"avatar_url":"https://avatars.githubusercontent.com/u/4956441?v=3","gravatar_id":"","url":"https://api.github.com/users/ngocthoaia1","html_url":"https://github.com/ngocthoaia1","followers_url":"https://api.github.com/users/ngocthoaia1/followers","following_url":"https://api.github.com/users/ngocthoaia1/following{/other_user}","gists_url":"https://api.github.com/users/ngocthoaia1/gists{/gist_id}","starred_url":"https://api.github.com/users/ngocthoaia1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngocthoaia1/subscriptions","organizations_url":"https://api.github.com/users/ngocthoaia1/orgs","repos_url":"https://api.github.com/users/ngocthoaia1/repos","events_url":"https://api.github.com/users/ngocthoaia1/events{/privacy}","received_events_url":"https://api.github.com/users/ngocthoaia1/received_events","type":"User","site_admin":false},"body":"removie this line\r\nand use ```lession_ids``` because if you have association ```lessions``` then it have ```lession_ids```","created_at":"2015-03-12T10:07:20Z","updated_at":"2015-03-12T10:07:20Z","html_url":"https://github.com/framgia/fels_28/pull/11#discussion_r26289568","pull_request_url":"https://api.github.com/repos/framgia/fels_28/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/comments/26289568"},"html":{"href":"https://github.com/framgia/fels_28/pull/11#discussion_r26289568"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_28/pulls/11","id":31014078,"html_url":"https://github.com/framgia/fels_28/pull/11","diff_url":"https://github.com/framgia/fels_28/pull/11.diff","patch_url":"https://github.com/framgia/fels_28/pull/11.patch","issue_url":"https://api.github.com/repos/framgia/fels_28/issues/11","number":11,"state":"open","locked":false,"title":"Rework learn 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-12T07:43:58Z","updated_at":"2015-03-12T10:07:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"670892ad10f79aa46a48a0a2fe99a339101f8110","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_28/pulls/11/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_28/pulls/11/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/11/comments","statuses_url":"https://api.github.com/repos/framgia/fels_28/statuses/e43e4b90def52fef89af2a9f72f74667b2f080b9","head":{"label":"hieuns:rework-learn-word","ref":"rework-learn-word","sha":"e43e4b90def52fef89af2a9f72f74667b2f080b9","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-12T09:27:28Z","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":259,"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":"8abc5b9894010e1eda36b2cf89df838ad2bafd0b","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-12T03:12:55Z","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":434,"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/11"},"html":{"href":"https://github.com/framgia/fels_28/pull/11"},"issue":{"href":"https://api.github.com/repos/framgia/fels_28/issues/11"},"comments":{"href":"https://api.github.com/repos/framgia/fels_28/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_28/pulls/11/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/11/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_28/statuses/e43e4b90def52fef89af2a9f72f74667b2f080b9"}}}}